Appropriate Consent Configurations
TCF Consent
If your website has a TCF API on the page, then the consent resolution mechanism must be TCF and not the default Optin. This helps the Zeotap SDK to also capture thegdpr_consent string.
In some cases, you may set up a default consent resolution mechanism and invoke the Zeotap JavaScript only if the user performs any action on the CMP. However, note that we do not recommend this step. Even when you invoke the SDK with the TCF Consent Configurations, the JS communicates with the TCF API on the page and only then the JS collects/captures the events. Otherwise, the JS just sits idle.
We recommend the following SDK configurations for the above scenario:
Code
Custom Consent
If you are setting up a Custom Consent collection on your website, ensure that you also choose the same in the SDK configurations. This is required in order to collect granular consent from the website. The SDK primarily performs the following three main tasks:- Capture user events
- Identify user
- CookieSync
yes/no) for all SDK purposes.
We recommend the following SDK configurations for the above scenario:
Code
setConsent method as mentioned below.
Capturing User Identities
With Collect SDK, you can collect User Identities (PIIs like email and cellphone number along with Custom Identities). The identities collected are then persisted across all the upcoming event-capturing calls. To persist user identities across the event payloads, invoke thesetUserIdentities method and not the setUserProperties method.
In order to persist user identities, you can use the setUserIdentities method as follows:
Case 1: Incoming identities are raw and can be sent to Zeotap CDP as is
SDK Configurations:Code
Case 2: Incoming identities are raw and need be sent to Zeotap CDP after hashing
SDK Configurations:Code
Case 3: Incoming identities are hashed
SDK Configurations:Code
Google Analytics Settings
With the Collect SDK, you can provision optional capturing of the GA client Id and user Id cookies for retargeting purposes on platforms like Optimize 360. To allow the SDK to capture the GA cookies, add the following configurations to thewindow.zeotap.init(WRITE_KEY, { .... }) call:
Code