Add it as a dataLayer parameter called gp_user_id in the formSubmission event
Save it to a cookie called gp_user_id, but only if consent is given for analytics cookies to be set
Consent to set the cookie can be determined like this:
analytics_storage is granted in Google Consent Mode V2 at the time when the cookie should be saved
To ensure full compatibility with different countries' privacy law, the default value for analytics_storage also needs to be set in Planet4 settings. At the moment, the default is always denied, but some countries don't need active consent for analytics data and would benefit from being able to set the default to granted (even before an interaction with the cookie block happens)
Objectives of task:
Only use the hashed email for analytics user tracking for improved privacy.
Brief summary of task:
On form submissions (GravityForms), generate an email hash. The hash needs to be base64 encoded SHA256 and the output needs to be the same as
gp_user_id
in this function: https://gist.github.com/stduerre/f98ed2cd4ac540da1c3389b674a64b90The generated hash needs to be used in two ways:
gp_user_id
in theformSubmission
eventgp_user_id
, but only if consent is given for analytics cookies to be setConsent to set the cookie can be determined like this:
analytics_storage
is granted in Google Consent Mode V2 at the time when the cookie should be savedTo ensure full compatibility with different countries' privacy law, the default value for
analytics_storage
also needs to be set in Planet4 settings. At the moment, the default is alwaysdenied
, but some countries don't need active consent for analytics data and would benefit from being able to set the default togranted
(even before an interaction with the cookie block happens)Objectives of task:
Only use the hashed email for analytics user tracking for improved privacy.
Relevant documentation:
Current hashing function: https://gist.github.com/stduerre/f98ed2cd4ac540da1c3389b674a64b90
Other resources:
No response
Estimated length of task:
No response
Timeline for task:
No response
Dependencies on other work:
No response
Example of similar work:
No response
Help:
No response