Can I track attribution data via the JS SDK?

  • 10 March 2021
  • 0 replies
  • 196 views

Userlevel 5
Badge +9

This is a common question we receive in our Support queue! Currently, it’s not possible for Amplitude’s JS SDK to ingest ADID, IDFV, or IDFA data in Amplitude.

The current solution is to use the HTTP API V2 to send in the advertising IDs for your users. Fortunately, the HTTP API V2 already has a key/field for advertising IDs. In this example of the HTTP API V2 request, I am setting the ADID to AEBE52E7-03EE-455A-B3C4-E57283966239 for the unique user with device id equal to 5f9fbb3b-8b65-5a35-8ec1-699f5cfb2998.

 

curl -H 'Content-Type: application/json' -d '{"api_key": "INSERT_API_KEY","events":[{"device_id":"5f9fbb3b-8b65-5a35-8ec1-699f5cfb2998", "event_type":"adid_event", "event_properties": {},"user_properties": {},"adid": "AEBE52E7-03EE-455A-B3C4-E57283966239","ip":"127.0.0.1"}]}' https://api2.amplitude.com/2/httpapi

 

It’s important to note the following:

  • This HTTP API V2 method is intended to tag advertising ID information to users so that the attribution data can be mapped to the correct user in Amplitude. You should still leverage the JS SDK for tracking all of your events if that is how you have event tracking setup.

  • Advertising ID is scrubbed before showing up in the Amplitude UI. Thus, the Advertising ID will not be visible in a users individual event stream. 

More information about the HTTP API V2 can be found here. Hope this helps! Leave a comment below for any questions.


0 replies

Be the first to reply!

Reply