managed-components / tiktok

Other
2 stars 3 forks source link

Email and phone number auto hashed with wrong key #8

Closed agcty closed 1 year ago

agcty commented 1 year ago

The TikTok managed component currently sends hashed values but with the keys for unhashed values.

Current:

email: hashed phone_number: hashed external_id: hashed

Expected email: unhashed phone_number: unhashed external_id: hashed

or

sha256_email: hashed sha256_phone_number: hashed external_id: hashed

This is according to the TikTok documentation: https://ads.tiktok.com/gateway/docs/index?identify_key=2b9b4278e47b275f36e7c39a4af4ba067d088e031d5f5fe45d381559ac89ba48&language=ENGLISH&doc_id=1701890972946433#item-link-Identity%20Information%20Supported

image

In summary, you should either send, email or phone_number unhashed, or hashed but which requires different keys (sha256_email, sha256_phone_number).

When using Zaraz, the Tiktok ads manager shows the following recommendation:

image

It explicitly says to:

Use the correct parameter when sending customer information. For example, use "sha256_email" rather than just "email" for a hashed email.

Attribution at the moment doesn't really work.

A possible workaround for now would be to send the already hashed values with the right keys as a payload to the managed component.

agcty commented 1 year ago

EDIT: The TikTok documentation and ads manager are extremely confusing. With the Events API you should be okay to send

email: hashed phone_number: hashed external_id: hashed

Apparently, you only need to use sha256_ when using the Pixel, not the Events API!