What you will learn

This tutorial will teach you how to tag your application with our mobile SDK, in order to retrieve and leverage all the zone interaction analytics related to in-app actions from the Herow platform.

Overview of Analytics

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

For instance, the Herow platform manages the following in-app actions-related metrics:

  • Number of in-app actions displayed for each zone
  • Number & percentage of 'clicked-through' in-app actions

While the mobile SDK automatically generates some logs such as the In-AppActionDisplay Logs, others need to be tagged manually in the application by developers such as the Click-through Logs.

How does the SDK send logs to Herow?

The SDK uses the HerowAnalyticsManager to send logs to the Herow platform.

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

A pushLogsNow method also exists in the SDK, to immediately send the logs saved in the database to the Herow platform, each time a notification is displayed.

The Application Settings section on Herow allows you to manage:

  • The network that your application can use to send the logs back to the Herow platform: WIFI_ONLY or ALL (for all types of networks)
  • The maximum number of logs mentioned above
  • The maximum waiting time mentioned above

Default settings are:

  • Network type: ALL
  • Maximum number of logs: 30
  • Maximum waiting time: 25 seconds

These settings can be updated at any time on the App Settings section of the Herow Platform

In-app action display logs

Each time an in-app action is displayed, the SDK generates an analytics log automatically.

As a reminder, an in-app action is the display of:

  • partial information of one chosen HerowContent object
  • or the list of partial informations from the nearby HerowContent objects (as illustrated in the Quickstart tutorial)

'Click-through' logs

Every 'click-through' action from an in-app action opens a new View. Developers must 'tag' their application using the SDK to generate a corresponding log.

This is what HEROW calls a redirect log.

Redirect logs

Redirect logs can be generated using the [[HerowDetectionManager shared] redirectWithPlaceInAppAction:herowPlaceInAppAction from:from]; method, which contains two parameters:

  1. HerowPlaceInAppAction: the object for which the log is generated.
  2. From: use it to provide additional contextual information regarding the in-app action - for example, the Activity that originally displayed the in-app action. Be sure to use the same "From" value as the Android team

Being GDPR compliant

Please refer to the dedicated GDPR tutorial to make the SDK compliant with the GDPR.


Starting from version 3.0.3 on Android, the SDK won't collect analytics without getting the appropriate opt-ins

Step 1: Clone the SDK-tutorial repository

  • Clone the sdk-tutorial repository
git clone https://github.com/opsct/sdk-tutorial.git


  • Open the sdk-tutorial>ios>ObjectiveC>Zone>3-Alert folder


  • Open the sdk-tutorial>ios>SWIFT>Zone>3-Alert folder

Step 2: Configure the SDK

  • Configure your CocoaPod files and .plist
  • Configure your SDK with:
    • the appropriate Herow Environment ( PREPROD / PROD )
    • your SDK credentials

Switch to Swift

[[[[HerowInitializer sharedInstance] configPlatform: HerowPlatform.prod]
									 configAppWithIdentifier:@"your username"
									 sdkKey:@"your SDK Key"]

herowInitializer = HerowInitializer.shared
				 .configApp(identifier: "your username", sdkKey: "your SDK Key")

If you need more informations, have a look to the 5 minutes quickstart tutorial

Generate the log


You must have completed the creating an in-app action tutorial to continue.

  • Open the AlertViewControllerAction.m file
  • In the viewDidLoad method, add the redirectWithPlaceInAppAction method to generate an alert log.

Switch to Swift

- (void)viewDidLoad {
    [super viewDidLoad];
    [[HerowDetectionManager shared] redirectWithPlaceInAppAction:currentPlaceInAppAction from:@"AlertViewControllerAction"];
    public override func viewDidLoad() {
        HerowDetectionManager.shared.redirect(placeInAppAction: currentPlaceInAppAction, from: "AlertViewControllerAction")

Start testing

  1. In Xcode, launch the installation of the application you just built on your mobile phone.

  2. move your device to the zone or simulate the visit with GPX file (or simulator location)

  3. Wait for a few seconds

  4. The tag of the in-app action appears, as defined in HEROW