Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-7547

Generate an email hash on formSubmission events and set it in dataLayer/Cookie

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Merged
    • Icon: Should have Should have
    • 2.133.0
    • 8
    • Analytics

      Summary

      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.

      Requirements

      The generated hash needs to be used in two ways:

      • 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 Planet 4 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).

      Resources


      Copied from Github

            contributor Community Contributor
            nroussos Nikos Roussos
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: