This guide describes how to enable advertising features using the Google Analytics SDK v3 for iOS.
Learn more about Google Analytics Advertising Features.
To use Google Analytics advertising features requires that you collect the
IDFA (Identifier for Advertisers). To enable IDFA collection, link the
AdSupport.framework libraries to
your application and set the
allowIDFACollection property to
YES on each tracker for which you want to enable advertising
features. For example
// Assumes a tracker has already been initialized with a property ID, otherwise // getDefaultTracker returns nil. id
tracker = [[GAI sharedInstance] defaultTracker]; // Enable Advertising Features. tracker.allowIDFACollection = YES;
The feature works by collecting the advertising identifier. Please make sure to review and adhere to all applicable SDK policies when using this feature.