Mobile push notification tracking

Wiring up Batch SDK to AT Internet

First, you need to wire up Batch SDK to a small plugin. Its job will be to read Batch's notifications clicks and extract the right parameters before sending them to AT Internet.

andro.png Android:

Start by copying the ATInternetBatchIntegration class to your project. The code can be found here:

As shown in the BaseActivity example of the gist, you will have to call ATInternetBatchIntegration.handleIntent in every activity, both in onCreate and onNewIntent.


ios.png iOS:

Copy the ATInternetBatchIntegration class in your project. The code can be found here (Swift 4.2):

Then, as shown in the gist, simply call ATInternetBatchIntegration.setup() in applicationDidFinishLaunchingWithOptions before Batch.start(withAPIKey:). If you call this method after starting Batch, the integration may not work correctly


XTOR creation in AT Internet

You will have to create a Custom Marketing Campaign on AT Internet. First, go to Settings (top right menu) > Settings > Custom Marketing Campaign.


Then you must create a Source (named 'Push Campaign' for instance) and a Campaign using that source. Once the campaign is created, it will be associated with an xtor parameter that you are going to need for the next and final step.



Linking your AT Internet campaign with your push campaign

The last step is to add your xtor query parameter to the deeplink of the push notification campaign you are about to send. For instance, if my xtor is CS1-123-label1-label2-label3, there are two ways of adding that info into a Batch notification.

  • Either you add the parameter in your deeplinks: myApp://categories/clothes?xtor=CS1-123-label1-label2-label"} 
  • Either you add the parameter in the custom payload of the campaign: {"xtor":"CS1-123-label1-label2-label3"} 


Now, each user who opens this notification will be tracked down by AT Internet SDK and will be visible as a 'Campaign traffic source'

Have more questions? Submit a request