Additionally, paste this code immediately after the opening tag:
October 17, 2023
5 mins

Tracking HubSpot Forms with Google Analytics: A Comprehensive Guide

Introduction

At 3WH, we understand the importance of tracking and analysing data to make informed decisions and optimise our online marketing efforts. One crucial aspect of this process is tracking form submissions on our website. This thorough manual will show you how to easily combine HubSpot forms with Google Analytics so you can gain insightful data and enhance your entire marketing approach.

Why Track HubSpot Forms with Google Analytics?

HubSpot provides a powerful and user-friendly platform for creating and managing forms on your website. By combining the capabilities of HubSpot forms with the analytical power of Google Analytics, you gain a deeper understanding of how your forms are performing, enabling you to make data-driven decisions to enhance user experience and maximize conversions.

Step 1: Set Up Google Analytics Tracking Code

Before we can start tracking HubSpot forms, ensure that you have correctly installed the Google Analytics tracking code on your website. This code enables Google Analytics to collect data and generate detailed reports about your website's traffic and user behavior.

Just adhere to these easy instructions to configure the tracking code: 

  1. Log in to Google Analytics and choose the property that corresponds to your website.
  2. Click "Tracking Info" in the "Property" column under the "Admin" section.
  3. Select "Tracking Code" to access the JavaScript tracking code snippet.
  4. Copy the entire tracking code snippet provided.
  5. Open your website's HTML source code in a text editor.
  6. Locate the <head> section of your HTML file.
  7. Paste the tracking code snippet just before the closing </head> tag.
  8. Save and publish the updated HTML file to your website.

Congratulations! You have successfully set up the Google Analytics tracking code on your website, laying the foundation for tracking HubSpot forms.

Step 2: Identify Your HubSpot Form

To track a specific HubSpot form using Google Analytics, you first need to identify the form's unique identifier. Follow these steps to find the HubSpot form ID:

Log in to your HubSpot account.

  1. Select "Lead Capture" from the drop-down menu on the "Marketing" tab.
  2. Click "Forms" to view a list of all your active forms.
  3. Choose the form you want to track and click on its name to access the form editor.
  4. In the form editor, locate the URL in your browser's address bar. The URL will look similar to this: https://app.hubspot.com/forms/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/edit/form.
  5. Make a note of the alphanumeric ID after /forms/ in the URL. This ID uniquely identifies your HubSpot form and will be required in the next steps.

Step 3: Configure Event Tracking in Google Analytics

With the form ID in hand, let's proceed to configure event tracking in Google Analytics. By tracking form submissions as events, you can gain insights into user interactions and goal completions.

To set up event tracking, follow these instructions:

  1. Access your Google Analytics account and select the property associated with your website.
  2. Click on "Goals" in the "View" column under the "Admin" section.
  3. Click on the "+ New Goal" button to create a new goal for tracking form submissions.
  4. Choose the "Custom" option and click "Continue."
  5. Give your goal a descriptive name, such as "HubSpot Form Submission."
  6. Select the "Event" type and click "Continue."
  7. In the "Event conditions" section, configure the following fields:
  8. Category: Enter a relevant category, such as "Form Submission."
  9. Action: Specify an action that represents the form submission, such as "Submit" or "Completion."
  10. Label: Optionally, add a label to provide further details or context.
  11. Value: Leave this field blank.
  12. Click "Save" to create the new goal.

Step 4: Implement Event Tracking on Your HubSpot Form

Now that you have configured event tracking in Google Analytics, it's time to implement the tracking code on your HubSpot form. This code will send an event to Google Analytics each time the form is submitted, allowing you to capture valuable data.

Follow these steps to implement event tracking:

  1. In your HubSpot account, navigate to the form you want to track.
  2. Access the form editor for the chosen form.
  3. Click on the "Options" tab.
  4. Scroll down to the "Form Submission" section and enable the "Send data to an external URL" option.
  5. In the "External URL" field, enter the following JavaScript code:

html

Copy code

<script>

  (function() {

    var form = document.querySelector('#YOUR_FORM_ID');

    form.addEventListener('submit', function() {

      ga('send', 'event', 'Form Submission', 'Submit');

    });

  })();

</script>

  1. Replace #YOUR_FORM_ID with the form ID you obtained earlier.
  2. Save the changes to your HubSpot form.

Congratulations! You have successfully implemented event tracking on your HubSpot form. You may track and examine form submissions by sending an event to Google Analytics each time a visitor submits the form.

Conclusion

By integrating HubSpot forms with Google Analytics, you unlock a wealth of valuable data that can drive your marketing strategy forward. Tracking form submissions provides insights into user behavior, conversion rates, and overall website performance. With the comprehensive guide we've provided, you now have the knowledge and tools to outrank competitors in search engine rankings and make data-driven decisions to optimize your online presence.

Tracking HubSpot Forms with Google Analytics

Diagram:

The diagram above illustrates the seamless integration between HubSpot forms and Google Analytics, enabling effective tracking of form submissions and data analysis for enhanced marketing insights.

Note: The diagram, which provides a visual depiction of the procedure, can be adjusted to meet your unique requirements.

Remember, at 3WH, we are passionate about helping businesses succeed in the digital landscape. Stay tuned for more insightful guides and expert tips to enhance your marketing efforts.

Other posts

Mastering Google Ads for SaaS Success: A Comprehensive Guide
April 12, 2022
5 mins 25 secs

Mastering Google Ads for SaaS Success: A Comprehensive Guide

Harnessing the power of Google Ads can help your Software as a Service (SaaS) company experience outstanding success in the dynamic world of digital marketing. As a highly proficient SEO and copywriter, we are here to guide you through the intricate nuances of Google Ads, equipping you with the knowledge and strategies needed to outrank your competitors and seize the attention of your target audience. So, buckle up and get ready to embark on a journey towards unparalleled success in the realm of Google Ads for SaaS!

Read more
Unlocking SaaS Marketing Strategy Success: A Comprehensive Guide for Growth-Oriented Businesses in 2023 and Beyond
July 26, 2022
6 mins

Unlocking SaaS Marketing Strategy Success: A Comprehensive Guide for Growth-Oriented Businesses in 2023 and Beyond

Welcome to our comprehensive guide on SaaS marketing strategies designed to empower growth-oriented businesses in the competitive digital landscape of 2023 and beyond. We at 3WH will go deeply into the nuances of software-as-a-service (SaaS) marketing, arming you with cutting-edge strategies to outrank your rivals and succeed in the rapidly developing digital space. Our expert insights and technical expertise will unlock the potential for unparalleled success in your SaaS marketing campaigns, focusing on key areas that can't be ignored in the coming years.

Read more
9 Powerful Steps to Transform TripAdvisor Reviews: Unlocking Positive Feedback for Tour Operators
May 17, 2023
7 min 50 secs

9 Powerful Steps to Transform TripAdvisor Reviews: Unlocking Positive Feedback for Tour Operators

Welcome aboard, travel industry aficionados! Dive deep into the intricate maze of TripAdvisor reviews with 3WH. From harnessing the power of AI and unexpected moments to skilfully navigating negative feedback, we unveil nine transformative strategies crafted for the modern travel business. Remember, reviews are not just feedback; they're opportunities. With each review, be it praise or critique, lies a chance to elevate your brand, foster trust, and create memorable experiences. Ready to make TripAdvisor your ally? Let's journey through the world of reviews and set your brand on the path to excellence. Join us, as we redefine the review game.

Read more