Skip to content
This repository was archived by the owner on May 5, 2026. It is now read-only.

Tracker Delegate

Benjamin Diolez edited this page May 5, 2026 · 1 revision

Data collection / Apple / Advanced features / Tracker Delegate

Foreword

The instance of a tracker is accompanied by a delegate enabling you to track the tagging of your application. It is therefore easier to detect a problem or execute custom processes.

Use

Once your tag is initialised, you must assign the delegate property of the tracker to the instance of the class which implements the protocol methods of the TrackerDelegate. We also have a default class that implement the protocol named DefaultTrackerDelegate.

In the case of a Swift project, make sure to import the Tracker module (or tvOSTracker/watchOSTracker if your target is an Apple TV or an Apple Watch) in your View Controller. In the case of an Objective-C project, make sure to import the headers Tracker-Swift.h

let defaultDelegate: DefaultTrackerDelegate = DefaultTrackerDelegate()
override func viewDidLoad() {
	super.viewDidLoad()
	let tracker = ATInternet.sharedInstance.defaultTracker
	tracker.delegate = defaultDelegate
}
self.defaultTrackerDelegate = [[DefaultTrackerDelegate alloc] init];
self.tracker.delegate = self.defaultTrackerDelegate;

Wiki contents

Clone this wiki locally