googleanalytics / google-analytics-plugin-for-unity

Google Analytics plugin for the Unity game creation system
Apache License 2.0
387 stars 140 forks source link

Demographics data not being collected #137

Open MHopke opened 8 years ago

MHopke commented 8 years ago

Hi,

I have the "Send IDFA / adID" toggled on the GAv4 object, but I'm not getting any demographics data in the analytics page / view. Are there any other settings I need to adjust to be able to collect that information?

Thank you! P.S. I've also replied in item #107 but haven't heard back there.

BlaceX commented 7 years ago

This still seems to be an issue. It does not look like the IDFA is send. Everything works fine on Android. Is it something you can look into @baldwin628 ?

Thanks

baldwin628 commented 7 years ago

@BlaceX Are you including libAdidAccess.a ? This is required for us to access IDFA. https://developers.google.com/analytics/devguides/collection/unity/v3/devguide#ios

I just with xcode9-beta and it seems fine, but only with this library.

This is also missing from our documentation :(, so I'll see about getting that updated and making this easier.

In the meantime you can get libadidaccess.a in the SDK download here: https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download

baldwin628 commented 7 years ago

With that first link, meant to also ask if you were including all the libraries listed there.

BlaceX commented 7 years ago

@baldwin628 Thanks for replying. I did try adding the libAdidAccess.a manually in x-code, but got linker errors. As I didn't see it in the documentation for the unity-plugin i didn't dig deeper and try to fix it. I guess it might be because I didn't have the version of libAdidAccess.a matching the version of the libraries shipped with the unity-plugin. Or that I might be missing a librabry from the list in the link you provided.

I will look into this on Monday. Thanks.

BlaceX commented 7 years ago

@baldwin628 I have modefied our project and tested now. It is finally sending IDFA with hits. Here is what i had to do:

  1. Download Analytics v3.17 from https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download

  2. Replace files in unity(from the plugin) with corresponding files from the download\GoogleAnalytics\Library folder

  3. Replacing libGoogleAnalyticsServices.a in unity with file from the download

  4. Adding libAdIdAccess.a from the download

  5. Make sure all libraries required are linked in x-code

  6. Add two entries to BuildSettings->Linking->Other Linker Flags in x-code: -framework AdSupport -force_load "$(SRCROOT)/Libraries/Plugins/iOS/libAdIdAccess.a"

I dont know how many of these steps are specific for our project only, but i thought i should mention them for others who face the issue and what might be needed in the documentation for the Unity plugin.

Thanks for helping.