Obtaining your device ID

Details on how to identify your device ID for testing purposes

Whenever you are performing test sends for not profile-based channels such as web push, mobile push, inbox, onsite/in-app messages, identifying the device ID is necessary. You'll find details on how to identify your device ID in the different environments.

Web-based channels

For web-based channels (web push, web inbox, onsite messages), you can easily obtain the device ID from the developer tools of your browser of choice (Chrome, Opera, Firefox or Safari). Open it by pressing Option+Command+I (⌥⌘ I) on Mac or F12 or Control+Shift+I for Windows. Navigate to the JavaScript Console tab. Use the following SDK method to obtain your device ID:

xtremepush('get','device_info');

The system will return the device id as id (not the entry named device_id).

2724

Obtaining the device ID from the JavaScript console (in the example, the device ID is 1126314414).

Mobile-based channels

For mobile-based channels (mobile push, mobile inbox, in-app messages), obtaining the device ID will be easy in your stage apps. You can do so by calling the following:

mPushConnector.getDeviceInfo(this).get("XPushDeviceID");
//This will return the Xtremepush device ID as a string.
XPush.deviceInfo[@"deviceID"]
XPush.deviceInfo["deviceID"]

You can also find your device ID in the SDK debug logs.

In your production app, you will need to identify your device ID from the user interface, narrowing down the results through the different data points that our mobile SDKs collect. To do so, you can use our segmentation engine (by selecting the conditions Device info, Location and Attributes) to identify your device.

Some of the data points that you can use are:

  • Device model
  • Operating system (OS version)
  • Carrier
  • Language
  • Country

Use a combination of these to narrow down the results.

Segmenting by device ID

Once you have identified your device ID, you'll be able to include it by using the segmentation engine (from Audiences or directly from the segmentation within the campaign).

2726

Example of a web push campaign addressed to a test device.

👍

Best practices

Click on Calculate before launching the campaign and make sure that the recipient count is higher than 0 and matches what you expect.