Optional Features

After you've configured your iOS app with CocoaPods or manually with Google Analytics Services SDK, you can optionally include the following files to enable certain features such as Enhanced Ecommerce, IDFA (Identifier for Advertisers), and iAd install campaign measurement.

Enhanced Ecommerce

To use the enhanced ecommerce features, add the following file to your app:

  • GAIEcommerceFields.h

IDFA (Identifier for Advertisers)

To use the IDFA (Identifier for Advertisers), link the following files to your app and then enable IDFA collection:

  • libAdIdAccess.a
  • AdSupport.framework

If you use CocoaPods to install and manage dependencies and want to collect IDFA, instead of manually linking libAdIdAccess and AdSupport.framework, add the GoogleIDFASupport Cocoapod to the Podfile:

pod 'GoogleIDFASupport'

That will link the required IDFA library and system frameworks.

Enable IDFA (Identifier for Advertisers) collection

To enable IDFA collection, set the allowIDFACollection property to YES on each tracker that will collect the IDFA. For example:

// Enable IDFA collection.
tracker.allowIDFACollection = YES;

iAd install campaign measurement

To use automatic iAd install campaign measurement, add the following framework to your application target's linked libraries:

  • iAd.framework