Forum Xamarin Xamarin.iOS

Google Analytics and IDFA

Hi there!
I'm trying to enable IDFA support into my app following the instructions on Google Site:

[tracker set:allowIDFACollection value:@YES];

In the Xamarin binding there isn't any specific method so I'm setting the property using the Set method. I trying to do this:

tracker.Set(GAIConstants.Idfa, "yes")

But I'm not sure if the constant name and value are right. Yes should be a number 1, but the method accept only strings. Anybody has used it?



  • LeandroLancelotiLeandroLanceloti BRMember ✭✭

    var tracker = GAI.SharedInstance.GetTracker("UA-XXXXXXX-X");

  • Thank you. Last year it wasn't available :-)

  • RainerMagerRainerMager JPMember ✭✭✭

    Did this go away? I don't see SetAllowIdfaCollection as existing in Tracker.

  • RainerMagerRainerMager JPMember ✭✭✭

    I figured it out. GetTracker returns an ITracker, but if you cast it to Tracker then the method exists.

  • RainerMagerRainerMager JPMember ✭✭✭

    Actually that's not correct either, but I did finally figure it out.

    So, the SetAllowIdfaCollection method exists in Google.Analytics.Tracker_Extensions, but I was doing using GA = Google.Analytics;, so that wasn't in scope. After I changed this to a normal using Google.Analytics; it started working.

Sign In or Register to comment.