What you will learn

This tutorial will teach you how to tag your mobile application with our mobile SDK, in order to retrieve and leverage all the beacon interaction analytics related to notifications from the Adtag platform.

About Analytics

The Adtag platform generates many types of analytics around beacon usage and interactions, based on the logs created by the mobile SDK.

For instance, the Adtag platform manages the following notification-related metrics:

  • Number of notifications displayed for each beacon
  • Number & percentage of 'clicked-through' notifications

While the mobile SDK automatically generates some logs, others need to be tagged manually in the application by developers.

How does the SDK send logs to the Adtag platform?

The SDK uses the AdtagLogsManager to send logs to the Adtag platform.

The AdtagLogsManager saves the logs in a specific database, and sends them in a dedicated thread when a maximum number of logs or a maximum waiting time is reached.

It exists as well a method called pushLogsNow that permits to send the logs saved in database immediatly to the Adtag platform. This method is called each time a notification is displayed.

The AdtagLogsManager allows you to configure:

  • the maximum number of logs mentionned above
  • the maximum waiting time mentionned above
  • the network that your application can use to send the logs to the Adtag platform: it can be WIFI_ONLY or ALL (for all types of networks)

Default settings are:

  • Maximum number of logs: 5
  • Maximum waiting time: 20 seconds
  • Network type: ALL

Beacon display logs

Each time a beacon notification is displayed, the SDK automatically creates a corresponding log.

'Click-through' logs

The SDK generates a log for every 'click-through' action from a user.

This is what Connecthings calls a redirect log.

In the case of an notification, the SDK generates a redirect log when a user clicks on a beacon notification.

How to permit to the SDK to generate notification redirect log

You use the ATBeaconAppDelegate class

  • Open the AppDelegate.m file
  • In the didReceiveLocalNotification method, call the super method from the ATBeaconAppDelegate super class
 -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
    [super application:application didReceiveLocalNotification:notification];

You don't use the ATBeaconAppDelegate class

  • Open the AppDelegate.m file
  • In the didReceiveLocalNotification method, call the didReceiveLocalNotification method from the ATBeaconManager to generate the notification redirect log
 -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
    [[ATBeaconManager sharedInstance] didReceiveLocalNotification:notification];