Skip to content

feat(google ads): Adding google ads and hashed emails to marketo form

Miracle Banks requested to merge google-ads-enhancement into main

Step 1: What is changing in this MR?

Summary

This merge request enhances our Marketo forms by adding functionality to hash email addresses before submission. Hashing email addresses enhances user privacy and security by ensuring that sensitive information is protected. This update will allow us to store and process email addresses in a secure manner.

Changes

  1. Added a function to normalize and hash email addresses.

  2. Updated the form submission handler to include hashed emails.

  3. Ensured compatibility with existing form functionality and data processing.

Implementation Details

1.Email Hashing Function: Implemented a function to trim, normalize (convert to lowercase), and hash email addresses using SHA-256. Ensured the function runs synchronously within the form submission process.

2.Form Submission Update: Modified the form.onSuccess method to hash the email address before pushing data to the dataLayer. Updated the form data structure to include the hashed email.

3.Testing: Verified that email addresses are correctly hashed upon form submission.Tested the integration with different forms to ensure no disruption to existing functionality.

related to: #3735 (closed)

Production Review app
https://about.gitlab.com/sales/ https://google-ads-enhancement.about.gitlab-review.app/sales/

Step 2: Ensure that your changes comply with the following, where applicable:

  • I, the Assignee, have run Axe tools on any updated pages, and fixed the relevant accessibility issues.
  • These changes work on both Safari, Chrome, and Firefox.
  • These changes have been reviewed for Visual Quality Assurance and Functional Quality Assurance on Mobile, Desktop, and Tablet.
  • These changes work with our Google Analytics and SEO tools.
  • These changes have been documented as expected.

Step 3: Ensure that your changes don't cause regressions on key pages, where applicable:

Production Review app
https://about.gitlab.com/ WIP
https://about.gitlab.com/ja-jp/ WIP
https://about.gitlab.com/pricing/ WIP
https://about.gitlab.com/ja-jp/pricing/ WIP
https://about.gitlab.com/sales/ WIP
https://about.gitlab.com/gitlab-duo/ WIP
https://about.gitlab.com/enterprise/ WIP
https://about.gitlab.com/platform/ WIP
https://about.gitlab.com/free-trial/ WIP

Build Variables:

  • Use Contentful Preview API
Edited by Miracle Banks

Merge request reports