How to Enhance Conversion Tracking with Google Tag Manager & HubSpot

Before diving into the technical steps of enhancing conversion tracking with Google Tag Manager (GTM) and HubSpot, let’s look at a real-world success story. Argo Translation, a leader in the language services industry, faced challenges with ineffective tracking of their investment into PPC campaigns. By leveraging the strategies outlined in this blog, they achieved an 86% increase in leads and reduced their cost per lead by 43%—all while improving lead quality to better match their business.

👉 Want to see how they did it? Check out the full case study here to learn how better tracking can transform marketing efforts and drive measurable results.

Now, let’s explore the tools and techniques that made it possible.

Looking to implement better conversion tracking for your clients? Here’s how to use Google Tag Manager with Hubspot.

1. Swap Page Load Tracking for HubSpot’s Form Success Message

Instead of tracking conversions on page loads, configure your triggers to fire on HubSpot’s “hubspot-form-success” event. HubSpot fires a dataLayer event upon successful form submissions, which tagging platforms can use to log the conversion. This approach reduces duplicate tracking and works well on websites without a thank-you page.

How to Implement:

Add this event listener to all pages of your site, ensuring it fires where HubSpot forms are embedded (including subdomains or third-party domains). Note: This works only for non-collected forms.

<script type=”text/javascript”> window.addEventListener(“message”, function(event) { if(event.data.type === ‘hsFormCallback’ && event.data.eventName === ‘onFormSubmitted’) { window.dataLayer.push({ ‘event’: ‘hubspot-form-success’, ‘hs-form-guid’: event.data.id }); } }); </script>

Once implemented, set up specific “hubspot-form-success” triggers in GTM for certain pages or site-wide.

Example of the specific set up “hubspot-form-success” triggers in GTM for certain pages or site-wide.

Pro Tip: If using a thank-you page for tracking, set referrer conditions to avoid false conversions (e.g., users revisiting the page later).

2. Use Form Data for Precise Trigger Conditions

GTM allows filtering trigger conditions based on form field values, helping you capture only high-quality leads. Here’s an example:

RFQ Page:

RFQ Page Radial Example

For one client, we excluded leads selecting “Personal” as their project type.

To do this, submit a test form and examine the dataLayer values in GTM under the “hubspot-form-success” event. Locate the project_purpose field to capture its value:

Under the dataLayer tab, you’ll find the dataLayer.push with important information: 

Create a GTM dataLayer variable that captures the project_purpose field. Use this variable to ensure only “Business” submissions trigger a conversion.

Contact Us Page:

On the client’s contact form, users select a reason for reaching out. Similar to the RFQ example, capture the how_can_we_help_you field value. We set conditions so only submissions with values like “Request for Quote” or “Request for Information” trigger conversions.

Taking the time to review and refine your client’s form tracking can significantly improve the accuracy of your conversion data. Don’t settle for “it works” when there’s potential for optimization.


Questions?

If you have any questions or are interested in having Granular help grow your business, please use the button below to get in touch!

Related Articles