Best Practices
Data Hygiene
In the following sections, we’ll reference a few terms we’ll define now, such as normalizing and hashing identifiers.
How to Normalize Identifiers
- Each raw identifier (plaintext email, mobile identifier, IP address and/or phone number) must be normalized before being hashed.
- Normalizing identifiers:
- Normalize email addresses by trimming leading and trailing whitespace and converting all characters to lowercase before hashing
- Normalize mobile advertiser id by using all lowercase. Do not remove hyphens
- Normalize phone numbers by including the country code, remove any double 0 in front of the country code. If the number itself begins with a 0, this should be removed. Also exclude any non-numeric characters such as whitespace, parentheses, ‘+’, or ‘-’
How to Hash Identifiers
- Hash raw identifiers with lowercase hex SHA256 format
- All user identifiers must be normalized BEFORE being SHA256 hashed
Deduplication
We recommend our web advertisers implement Conversions API alongside a Pixel integration, and our app advertisers to implement Conversions API alongside an MMP integration. Our systems support receiving redundant data; however, we recommend adopting the following guidelines to ensure accurate reporting and that events are only attributed once.
- Send
event_idon all events on all integrations (e.g. CAPI + Pixel).- This is a unique id used for deduplication against Pixel SDK events. For non-purchase events, this should match the
client_dedup_idon your Pixel SDK call. ForPURCHASEevents, this can also map to yourtransaction_id.
- This is a unique id used for deduplication against Pixel SDK events. For non-purchase events, this should match the
- These values can be created at the time of the event, but must match exactly across all calls via Snap Pixel, third-party connectors, and direct CAPI.
- Please always ensure timestamps are accurate.
For a step-by-step walkthrough — including how to expose a unique id to GTM, the recommended approach for PURCHASE events (transaction_id on the Pixel SDK and order_id on CAPI), and how to verify deduplication in Events Manager — see the dedicated Deduplication page.