How to use the Advertising ID in the Google Measurement Protocol
Asked Answered
T

2

2

This post replies very well to the question "How to get Advertising ID in android?"...

but not how to use it.

I would like to know what is the parameter to be used in the Google Measurement Protocol to transfer that advertising ID the Google endpoint and get demographic insights in my GA dashboards (on https://analytics.google.com/).

Do I have to send it with the client id ("cid")?

Or, to make it simple, what is the parameter used by the SDK on iOS and Android?

Trimurti answered 26/1, 2017 at 13:57 Comment(1)
Hello @Gilbou, i'm trying to do exactly the same, i tried by using the cid but it doesn't seems to work, did you managed this? Thank you!Teeny
T
0

It appears that the name of the parameter is "adid" for Android (and not "aaid"), as demonstrated by the screenshot below (request made by the GA SDK in a demo app).

enter image description here

It also appears (you see it on the screenshot) that the "ate" parameter must be sent with the advertising ID (ate=1 if the ads targeting is ON ; ate=0 if ads targeting in OFF) for the advertising ID to be taken into consideration by Google Analytics.

This implementation was tested and I can confirm that it works.

Trimurti answered 26/1, 2017 at 15:43 Comment(0)
W
0

If anyone is looking for this answer the parameter is &adid for android (&idfa for iOS). You also apparently have to send the store ID in the &aiid field (ex : com.android.vending for google play) and the app ID in the &aid field.

So basically in an android app hit you have &adid=abcde-fghij-klmno-pqrst-uvwxy&aiid=com.android.vending&aid=com.yourapp.android

Still testing to get the demographic report working with server side requests.

Wandawander answered 13/2, 2017 at 14:0 Comment(1)
Hi! Did it work? Is it "adid" or "aaid" for Android?Trimurti

© 2022 - 2024 — McMap. All rights reserved.