The AutoTracking module automatically triggers tracking calls when certain user interface interactions take place. For example, taps, swipes, screen views. In general, usage of this module is discouraged and not recommended for the following reasons:
Increased memory usage.
Increased possibility for crashes to occur due to UI changes outside of Tealium’s control. For example, UI component being deallocated before the track call has completed.
Increased battery consumption.
Unwanted additional tracking calls.
Does not fully remove the need to add additional tracking data/events, so additional coding is still required.
As an alternative to Autotracking, we strongly recommend you spend time carefully planning the tracking and data you need to capture, and have your developers pass this data to Tealium at the appropriate time. Autotracking may be useful if you are evaluating Tealium and need a quick implementation, but it is unlikely to fulfill all your tracking requirements on its own.
The following platforms are supported:
The AutoTracking module provides the following features:
Automatically trigger track calls from UIViewController view appearances.
Automatically trigger track calls for UI Events, such as button taps.
Includes delegate methods for reporting or suppressing auto-tracked data.
Uses method swizzling on UIApplication and UIViewController classes. Disable/exclude if you prefer to avoid swizzling in your app.
Install the AutoTracking module with CocoaPods or Carthage.
To install the AutoTracking module with CocoaPods, add the following pod to your Podfile:
The framework is auto-instantiated. It has a dependency on the TealiumCore pod. Learn more about CocoaPods installation for iOS.
To install the AutoTracking module with Carthage, following these steps:
Go to the app target’s General configuration page in Xcode.
Add the following framework to the Embedded Binaries section:
The framework is auto-instantiated. It has a dependency on TealiumCore. No additional import statements are necessary. Learn more about Carthage installation for iOS.
This module has been ported from Objective-C code, and as such, requires a Bridging Header.
To create a bridging header:
In your Swift project, create a new file. When prompted to select a file type, select “Objective-C File”.
Give this file a temporary name, such as placeholder.m, as you are going to remove it later.
Click Finish. Xcode prompts you to create a Bridging Header (if it doesn’t, you probably already have a Bridging Header in your project). Click Create Bridging Header to continue and have Xcode create the new header file for you.
Delete placeholder.m from your project. Notice a new file called ProjectName-Bridging-Header.h.
Add the following import statements to the new Bridging Header: