• Home
  • »
  • Forums
  • »
  • Mobile
  • »
  • Re: Mobile: How to Use Auto Tracking and Load Rule...
Reply
Employee Emeritus
Posts: 318
Registered: ‎09-01-2015

Mobile: How to Use Auto Tracking and Load Rules to Track Events

[ Edited ]

A tutorial showing how to leverage UI Auto-tracking in the full mobile library and load rules

 

Table of Contents:

Introduction

Tealium's Full Mobile Library has Auto Tracking which allows you to track almost everything in your app without implementing any custom tracking on anything in the app.

This tutorial will show you how to configure the UI Auto Tracking and configure your tags to only fire the actions you want to track in the app.

Step-by-step guide

1. Configuring your Tealium iQ Account

1.1 Full Mobile Library : Ensure you are using the full version of the Tealium Mobile Library in your app:

Tealium iOS Mobile Library

Tealium Android Mobile Library

1.2 Configure UI Auto Tracking and the Mobile Companion : Ensure UI Auto Tracking and the Mobile Companion* is turned on in the Mobile Publish Settings and you have published this to dev, qa and prod in Tealium iQ for the profile you are using in your mobile app.

1.3 Enable Tealium Collect to store hits for your to debug : Ensure your app is using the Tealium Collect tag* and you can see live events firing through on your app.

*Ensure the Tealium Collect tag is has a load rule of 'all pages'. If Tealium Collect is not enabled on the 'prod' Tealium environment then you'll need to make sure you are using a build of the app which points to the 'dev' or 'qa' Tealium environment in order to debug the hits using Live Events.

 

2. Setting up a Trace

2.1 Isolate your device using Trace : If you're debugging a production build of your app then you'll want to set up a Trace to isolate your device's hits. If you are debugging a dev or qa build of the app then you can skip to step 7.

In AudienceStream, go to Live Events under the Discover menu and add a new stream. Select Filter by Trace ID and make note of the Trace ID:

Filter by Trace ID Start Trace Make a note of the Trace ID

2.2 Open the Mobile Companion : In your app, open the Mobile Companion (if your developers have disabled the mobile companion in the production build of your app then ensure you have a build which has the mobile companion enabled)

Open the Mobile Companion

2.3 Join the Trace in the Mobile Companion : Go to 'Tools' in the Mobile Companion and join the Trace:

Go to 'Tools' and then 'Join Trace' Enter the Trace ID

 

3. Verify Event Tracking

3.1 View your actions in Live Events: If you are using an app build pointing to the dev/qa Tealium environment then you should only see your hits (unless other users are testing too) in Live Events. If your build is pointing to the prod Tealium environment then you should be using Trace to isolate only your hits:

Live Events

3.2 Perform an action you want to track using a tag : Now that you can see what are doing in the app, the Tealium Mobile Library will try to grab any action you perform in the app. So, do something in the app, find the hit in Live Events and take a look at the data sources to see how you can isolate this hit.

For example, I will submit the value 'hello' in this form in my app:

Submit Form

When I debug this event in Live Events I can see there are a couple data sources which look useful for isolating submissions in this form:

Output of hit for form submission

I can see the 'link_id' is set to 'UIWindow : tapped' and also that the Tealium Library has generated a unique 'tealium_id' for this hit. All I need to do now is set a load rule against this hit to ensure my tag fires when someone performs this action.

 

4. Controlling Tag Load by Event

4.1 Ensure your load rule for your tag includes this criteria : I'm going to add a load rule against my Google Analytics tag which will ensure the tag only fires on all 'view' events and when the 'tealium_id' equals 'b4a4af':

Load Rule for my Google Analytics tag

4.2 Set Data Sources for your UI Auto Tracked event : We know our tag is going to fire on all views and also our event. However, we want to make sure that we pass in some sensible values for the form submission so I'm going to use a 'set data values' extension to set some meaningful values:

Set Data Values

These data sources are mapped in my Google Analytics tag:

Mapping data sources

4.3 Save and Publish : Once I've saved and published*, when I submit my forms I can see all 'view' events are tracked but also my form submission event is showing in Google Analytics:

*You may need to close and re-open your app and/or wait 5 minutes for your device to download the latest Tealium version which will reflect your changes.

My event in Google Analytics

4.3 You're done! You can now build more complicated load rules and extensions to track almost anything in your app. For example, a more advanced load rule might looks like this:

More Mappings Advanced Load Rules

 

Reply
0 Kudos
Visitor
Posts: 4
Registered: ‎12-11-2017

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

Small problem, all the images are broken

Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

[ Edited ]

Thank you for letting us know @isaacc. Give me a moment to try and fix it.

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos
Highlighted
Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

How's this @isaacc?

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Visitor
Posts: 4
Registered: ‎12-11-2017

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

Much better, thank you!

Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

My pleasue @isaacc!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos
Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

[ Edited ]

Good morning @isaacc. I was just told by @craig_rouse that this particular article is old. What exactly are you trying to accomplish? Let us know! We are here to help!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Visitor
Posts: 4
Registered: ‎12-11-2017

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

Trying to get analytics.js set up with load rules based on domains, is there a better article for that?

Reply
0 Kudos
Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

[ Edited ]

Good question @isaacc

Perhaps @craig_rouse has an answer for that? 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Reply
0 Kudos
Tealium Employee
Posts: 410
Registered: ‎09-01-2015

Re: Mobile: How to Use Auto Tracking and Load Rules to Track Events

@isaac if you're just using this article as a reference for setting up load rules, I recommend this article instead: https://community.tealiumiq.com/t5/iQ-Tag-Management/Load-Rules/ta-p/5098

The parts of this page talking about load rules are still relevant, but the article focuses on a deprecated feature of our mobile libraries (Autotracking), so it wouldn't be a good idea (or even possible) to follow this tutorial exactly as it was written.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
Reply
0 Kudos