I’m trying to implement Google Ads Enhanced Conversion Tracking for a HubSpot form submission, but I’m facing an issue where the dataLayer doesn’t pass the user’s email address after successful form submission.
Here’s what we did:
On the thank-you page, we placed this code snippet to push the enhanced conversion data: <script> dataLayer.push({ 'event': 'ec_formsubmit', 'enhanced_conversion_data': { "email": 'email' } }) </script>
When we test the form and inspect the dataLayer in the browser console on the thank-you page, the “email” value appears as a literal string 'email' instead of the actual user email that was entered in the form.
Attached below is a screenshot of the console showing the dataLayer output after submission — as you can see, it’s not capturing the user’s email.
Note: Our website is on the Drupal platform, and we are using the HubSpot form on Contact us and Request a demo CTAs. We have already created a conversion action on Google Ads and triggered it with the help of GTM. Website link: https://www.beroeinc.com/contact
Any guidance or code examples from the HubSpot developer community would be really appreciated. Also, please do let me know after making changes to the code what changes we have to do on the GTM, too, if needed.
Thanks in advance!
Saket Tripathi (Assistant Digital Marketing Manager at Beroe Inc.)
I'd like to tag in some of our Top Contributors to see if they have any ideas on this -- Hi @Franci@beeginman and @jolle Do any of you have any tips for @SaketTripathi25?
Cassie, Community Manager
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.
I haven't received any response to my query. I need a solution asap kindly let me know what can I do to get reply of my query asap so that I can implement Enhance Conversions for my company.