Firebase and IDFA setup

708 views
Skip to first unread message

Valentino

unread,
May 2, 2017, 1:41:51 PM5/2/17
to Firebase Google Group
I'm working on an iOS application and I'm using Firebase to track analytics events and GTM as data layer.

We have a version of the app in the App Store but it's not configured to track IDFA.

Now I'm configuring IDFA tracking and I'm trying to test the setup on a staging env to see if everything is ok before submitting to iTC.

This is my setup
Firebase/Analytics (3.11.0)
GoogleTagManager (5.0.8)
GoogleAnalytics (3.17.0)
GoogleIDFASupport (3.14.0)

The app contains the GTM configuration file inside /container/GTM-ABC123.json

GTM is configured to track IDFA
{
   
"type": "BOOLEAN",
   
"key": "collectAdid",
   
"value": "true"
},

In the AppDelegate of my app I just configure Firebase by calling

let googleServicesPlistPath = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist")!
FIRApp.configure(with:FIROptions(contentsOfFile:googleServicesPlistPath))

No additional configuration.

I track the events by calling 

[FIRAnalytics logEventWithName:eventName parameters:properties];

I tried to build an test url using https://developers.google.com/analytics/devguides/collection/ios/v3/campaigns#url-builder with the following properties

Google Analytics Property ID: the same as the GTM config file
Ad Network: Custom
Redirect URL: the itunes URL for the app (this is the production app with production bundle id.)
App ID: the bundle id of the staging app (the staging app is distributed via Fabric)
Campaign Source: "google"
Campaign Medium: "cpc"

The generated URL contains the placeholder for the IDFA.

In my test device I reset the IDFA and used another test application to get the IDFA for that device.
I then used that IDFA in the URL to simulate a click on an advert.

I then installed the staging app from Fabric. The staging app has the same bundle Id I set in the URL.

I can see the IDFA being tracked by Firebase. The value of resettable_device_id is the same as the IDFA I set in the URL

2017-05-02 16:53:32.700 MyApp[1624:] <FIRAnalytics/DEBUG> Measurement data sent to network. Timestamp (ms), data:

1493740412699, <ACPMeasurementBatch 0x1700b8060>: {
    bundles
{
           
...      
      resettable_device_id
: "A0E8533D-1B09-4223-B502-7168D2203E4B"
      limited_ad_tracking
: false      
     
...      
   
}
 
}    

But when I open the GA console I don't see the attribution set correctly. The source/medium is direct/none for all the users.

I don't understand if my way of testing the app if wrong or if there's a misconfiguration somewhere.

Any suggestion?

Thank you for your time

Regards

Vale
Reply all
Reply to author
Forward
0 new messages