iosgoogle-analyticsidfa

Cant validate tracking code for demographic reports using Google Analytics iOS SDK with IDFA


I'm trying to gather Demographics and Interest Reports for my iOS app users using the Google Analytics iOS SDK.

I have enabled Demographics and Interest Reports in my Google Analytics dashboard. I also installed the GoogleIDFASupport pod (Cocoapods), and set the following code in my app delegate:

#if DEBUG
#else
    let gAnalytics = GAI.sharedInstance()
    gAnalytics.defaultTracker.allowIDFACollection = true
#endif

I have been testing the app multiple times, and running in Release scheme on my iPhone, and the app is also currently waiting for review in the App Store.

When I login to the Google Analytics dashboard, and go to the Demographics and Interest Reports section, it tells me that I have enabled it, but also presents a button that says "Validate tracking code". If I click the button, the page just refreshes and tells me that "Your Analytics tracking code does not include the necessary support for the Demographics and Interest reports."

How can I validate the tracking code?


Solution

  • I ended up just ignoring the warning and skipping the validation. The demographics stats have been showing up just fine.