Testing your integration

Batch provides a simple debug tool that allows you to test your custom data integration (⚙ Settings → Debug). It shows all the data available for a specific user ID:

  • Token: Find the token of a specific device.
  • Custom user ID: Check if your custom user ID implementation is working correctly.
  • Native attributes: See the installation date, last session date, country and more information on a specific user / install.
  • Custom data: See if your app is tagged properly and if custom attributes/events are sent to Batch.

Debug tool

Finding your ID

Installation ID

You can find the Installation ID of a device by calling:

batchSDK(api => {api.getInstallationID().then(function(id) {console.log(id);})});

This example directly prints it to your browser's debug console.

Tip: In development mode, Batch already prints the installation ID to the console!

Understanding the results

The results displayed in the debug tool are updated in real time. There are five different pieces of information shown for a single ID:

Here are some details on the native attributes you will find in the results:

  • b.city_code: City detected by Batch using IP geolocation.
  • b.install_date: First user visit on your website (UTC/GMT). Can be reset if the user clears their browser's data.
  • b.language: Language of your user.
  • b.last_push_date: Date of the last sent notification from the dashboard or the Campaigns API (UTC/GMT).
  • b.last_visit_date: Date of the last session (UTC/GMT).
  • b.region: Country of your user.
  • b.is_push_optin: True if the install is opt-in to push, meaning that it can receive and display push notifications