简体   繁体   中英

Get unique device ID on iOS with Google Tag Manager

I'm trying to get the Device ID via Google Tag Manager but got an error on iOS. After a quick search it seems that Apple blocked this.

Moreover, it seems that using idfa is not recommended (can lead to troubles to validate the app) and sometimes lead to unexpected errors.

What are my options here ?

  • Get the device ID via code and somehow (I don't know hate btw) push it to the data layer to retrieve it later via GTM ?

  • Find another unique ID ?

What would you suggest ?

Apple has blocked developers of using any kind of unique device id, like uniqueIdentifier, mac address, etc...

As you noted using the IDFA for this might get you in trouble, you are only allowed to use this for advertisement purpose.

There is the identifierForVendor , this ID is shared between all app from one developers. This ID will not change wil the user has any app on his device from the same developer.

The last option is to create a unique ID yourself and store this in the keychain where only you app(s) can access it.

I all cases you will have to push the value into tag manager yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM