Adding your Channel ID to a test group

When sending your first notification, you will choose Test Users as your audience. Follow these steps to find your Channel ID and add it to a test group.

 Important

Your Channel ID is only available if you have already integrated the Airship SDK with your app or website. If you have not yet integrated the SDK, follow the steps in Create a Messaging Project.

You have two options for finding your Channel ID and adding it to a Test GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview.:

Option 1: Speak with one of your developers about getting your mobile app or web channel added to a test group.

Option 2: Find your Channel ID and add it to a test group. Follow the steps on this page.

Finding your mobile app Channel ID

You can find a device’s Channel ID using the Channel Capture tool or by logging it to the console.

The Channel Capture tool is a feature built into the SDK. It copies the Channel ID to the device’s clipboard after you open the app six times within 30 seconds. Open your app and then navigate back to your device’s home screen. After the sixth app open, you can paste the Channel ID into a text input field. It will appear in the format ua:9c36e8c7-5a73-47c0-9716-99fSAMPLE7d5. The value after ua: is the Channel ID.

For console logging, you must first build into your app a mechanism to expose the device’s Channel ID to the console. See: Mobile: Channels.

You can view the console with these tools:

If you didn’t write the device identifier to the console, you can use the steps here to help retrieve it: Using Charles Proxy to profile an Airship Implementation.

 Tip

Even if you’re comfortable with using Charles Proxy, you may want to speak with your developer before you attempt to retrieve your Channel ID yourself. Your app may have been designed with a hidden feature that allows you to quickly retrieve your ID, saving you the difficulty of working with Charles Proxy.

Finding your web browser Channel ID

Your web Channel ID is only available if you have already integrated the Airship SDK with your website. To access your web Channel ID, you will need to open the Developer console in your browser and paste in a small amount of code. Instructions for Google Chrome and Mozilla Firefox are provided.

  1. Open the console via keyboard shortcut or the menu.

    Google Chrome

    • Keyboard Shortcuts: In macOS you can go directly to the console with Cmd+Opt+J. In Windows, the shortcut is Ctrl+Shift+J.
    • Menu: Click and go to More Tools » Developer Tools, then select the Console tab.

    Mozilla Firefox

    • Keyboard Shortcuts: In macOS you can go directly to the console with Cmd+Opt+K. In Windows, the shortcut is Ctrl+Shift+K.
    • Menu: Click the “hamburger” icon and go to More Tools » Web Developer Tools, then select the Console tab.
  2. Paste UA.then(sdk => {console.log(sdk.channel.id)}) in the console, then hit Enter. If a browser has registered, the resulting line is the Channel ID.


Common errors:

  • The SDK will return null if the browser is unregistered. Only registered browsers will have a Channel ID. See our documentation on how to register the current browser with Airship.

  • A UA is not defined response can indicate that the SDK snippet is not present within the page. Navigate to a page on your site that does have the SDK snippet and repeat step 2 above.

     Note

    Ideally, the SDK snippet will be present in every page on your site, as per the Add JavaScript Snippet section of our Web Getting Started guide. If, for testing or other reasons, you have added the snippet to just one page of your site, you will need to be on that specific page for retrieving your Web Channel ID to be successful.

Creating a Test Group

The following steps are an abbreviation of the Preview and Test Groups documentation. See the linked version for caveats and additional information.

  1. Select the Audience menu, then Preview and Test Groups.
  2. Select Create group.
  3. Enter a name for the group.
  4. Enable Test group.
  5. Select Save and continue.
  6. Select Add user and enter your name and app or web Channel ID.
  7. Select Done.

Now you are ready to send your first message.