Send activity information to Adobe Analytics

This section describes how to send Target mobile app activity information to Adobe Analytics for post hoc segmentation.


  • This integration requires that Analytics and Target are implemented using the mobile SDK.

  • Ensure that your report suite is enabled to receive activity information from Target.

    This is usually done by adding the Target client code to the Analytics report suite. This might be enabled already if you are using the SiteCatalyst-Test&Target integration for web activities. Contact Adobe Client Care if you have any questions about this step.

  1. Obtain the activity information.

    If you include a string like the following in your experience content, Target returns the activity information that you can send to Analytics:


    Replace the text in your experience json code with something like the following example:

      "tntVal": ${}:${}:${campaign.recipe.trafficType}", 
      "title":"Welcome Message", 
      "message":"Get Free Shipping Today!" 

    In this example, a node with the variable tntVal is added to obtain the activity information. Add similar code for the other experiences, with an appropriate title and message.

    This string delivers a number (such as 115110:0:0) in the response from Target. This indicates the activity ID, experience ID, and traffic type. The following is a sample response from Target:

      "tntVal": 115110:0:0", 
      "title":"Welcome Message", 
      "message":"Get Free Shipping Today!" 
  2. Parse the JSON object.

    Parse the response that came back from Target in the callback. You can use NSJSONSerialization to parse this response and store it in a dictionary or an array.

    Refer to the NSJSONSerialization documentation for more information.

  3. Send the data to Analytics.

    Add the parsed activity information (such as tntVal in the above response) to your context data object in an Analytics call. This Analytics call containing the context data can be fired immediately or it can wait until the next Analytics call is fired.

    For example, this call can be fired in the callback of the targetLoadRequest call:

    [ADBMobile trackAction:@"Welcome Screen"  
          data:@{@"&&tnt" : tntVal from response}];

    &&tntis a reserved event key in the mobile SDK. The post-classification of the tntVal variable in Analytics works in the same way in the mobile SDK as it does on the web (JavaScript). After the information is processed in Analytics, you should see activity and experience names in the Analytics interface.

On this page