Custom Web Notification Buttons

Buttons that you add to your Airship project settings are available to other users in your project, ensuring that your buttons are uniform across notifications and Airship reports.

You can add buttons to Web notifications to direct users to take specific actions. Web notifications support one or two buttons, e.g., a single Opt in button, or a Yes/No pair, and you associate each button with an ActionA configurable behavior that occurs when a user interacts with your message, e.g., opening a web page. . You can also add or remove a tag when the user clicks a button.

Airship records button clicks to help you track how your audience engages with your messages. Airship records them as Custom EventsEvents that indicate that a user performed a predefined action, such as adding an item to a shopping cart, viewing a screen, or clicking an Unsubscribe button. Custom events can trigger automation and journeys. You can code them into your app or website, or send them to Airship from an external source using the custom event API. Custom events contain properties that you can use to personalize messages. with the name button--<BUTTON_ID>, where BUTTON_ID is either the button’s label or ID (when using the API). These events are included in Message Reports, Event Tracking, and Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. .

Airship provides 30+ predefined buttons, which have preset labels and actions. Some buttons support changing their associated actions.

You can also create custom buttons when you create a message, or within your project so you can reuse them for other messages. Custom buttons can be associated with Airship actions, or they can be associated with custom actions.

Create reusable buttons for Web notifications

Buttons that you create in your project appear under Select Buttons when you add buttons to a Web notification. You will associate an ActionA configurable behavior that occurs when a user interacts with your message, e.g., opening a web page. with with the button after you add it to a message.

  1. Go to Settings » Channels » Web and click Manage for Web Notification Buttons.
  2. Click New Web Notification Buttons.
  3. Enter a Name and Description. The name helps you identify your buttons when setting up a message.
  4. Enter a Label for each button — these are the button labels users see in your web messages.
  5. Click Save.

Add buttons to a Web notification

In the Content step of a composer:

  1. Enable Buttons.
    1. Click Select or add buttons.
    2. Select your buttons, or click Create Buttons to make your own custom buttons for this message. To add:
      1. Click Add buttons.
      2. Enter a label for the Primary button (normally affirmative) and an optional Secondary button (appears to the right of the primary button).
      3. Click Add buttons.
    3. Set an ActionA configurable behavior that occurs when a user interacts with your message, e.g., opening a web page. for each button.
    4. (Optional) Set and/or remove tags when the user taps a button. Tags can help you track whether your users engage with, or dismiss, your notifications.
      1. Click Set a tag.
      2. Select Add or Remove, then search for tags that exist in the system, or create a new tag.
      3. (Optional) Click Set another tag and repeat the previous step.
       Tip

      Setting one or more tags when a user interacts with a message can help you track user interactions for follow-on retargeting campaigns. For example, if you set a tag responded-campaign1, you can target users bearing the responded-campaign1 tag with another message at a later date, knowing that they are active users. Alternatively, you can re-engage users with this tag using an automated message if they are inactive for a period of time.

    Web button events and reporting

    Button click events as they appear in Event Tracking:

    In Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. button clicks are custom events with button--<button_label> as the body.name property.

    {
      "id": "11f6d751-7818-4436-8f40-6c4a343deb5e",
      "offset": "1000032296503",
      "occurred": "2020-07-17T18:13:49.000Z",
      "processed": "2020-07-17T18:13:49.905Z",
      "device": {
        "channel": "21f72485-47a4-c369-a21b-c0d73698b14c",
        "device_type": "WEB",
        "named_user_id": "cool_person"
      },
      "body": {
        "name": "button--hello world",
        "interaction_type": "url",
        "interaction_id": "https://www.airship.com",
        "session_id": "45a1576f-1af3-4c8e-9d6d-44d546e1271a",
        "source": "SDK"
      },
      "type": "CUSTOM"
    }