Custom Web Notification Buttons

Create reusable web notification buttons that prompt your web audience to take action. 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. You set a Message ActionA configurable behavior that occurs when a user interacts with your message, e.g., opening a web page. determining what happens when users click each button. You can also add or remove a tag when the user clicks a button.

Airship has several predefined buttons with preset labels. You can also create your own custom buttons. You can create reusable custom buttons in your project’s Configuration page, or you can create custom buttons on the fly when you create a message, but they will not be saved in your project.

Airship uses your button labels, in the format button--<button_label>, as identifiers for click events in message reports, Performance AnalyticsA customizable marketing intelligence tool that provides access to reports and graphs based on engagement data. , and the event name for custom events in Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. .

Create buttons for Web notifications

Buttons that you create appear under Select Buttons when you add buttons to a Web notification.

  1. Go to Settings » Configuration » 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.

  1. Enter a Label for the Primary and Secondary buttons — these are the button labels users see when they receive messages.

  2. Click Save.

Add buttons to a Web notification

  1. When creating your message, enable Buttons.
  2. Click Select or add buttons.
  3. Select your buttons, or click Create Buttons to make your own custom buttons for this message.
    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). Button labels are used as event identifiers in Performance AnalyticsA customizable marketing intelligence tool that provides access to reports and graphs based on engagement data. and the event name in Real-Time Data StreamingA service that delivers engagement events in real time via the Data Streaming API or an Airship partner integration. in the format button--<label>.
    3. Click Add buttons.
  4. Set an action for each button.
    Home Home opens your app’s home screen. For web push notifications it opens your Default Action URL. You can override the default URL by selecting the Web Page action and entering a different URL.
    Dismiss Message Dismiss Message closes the notification.
    Web Page Web Page opens a web page or any valid-device level URL such as App Store or app protocol links. The web page opens in the device’s default browser. Enter a URL.
    Adaptive Link

    Adaptive Link opens a mobile wallet pass. Select an Adaptive LinkA mobile wallet pass link that supports templates for both Google Pay and Apple Wallet. When a user taps the link, Airship determines the user’s platform and generates the right pass for the user. from the list.

    • Adaptive links must be configured before they will appear in the actions list. See: Adaptive Links Tutorial.
    • Only adaptive links created in the dashboard will appear in the actions list.
  5. (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

Airship records web button clicks to help you track how your audience engages with your messages. Using uniform button names can help you track engagement across messages.

Button clicks appear as button--<button_label> in message reports.

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"
}