APIs & Integrations

Not applicable

Issue connecting Hubspot embed form with Google Analytics

Hello everybody,

I'm experiencing a small issue when I want to connect the forms submission with Google Analytics.

I added this code to my embed forms :

And created this goal to Google Analytics but nothing happened (I wanted to upload the picture but since i'm new here, I can't) :

Category : Form
Action : Submission
Name : Report

Do you have any idea of what's wrong ?

Also is it possible to connect the forms with Adwords and know which forms are submitted for which adwords campaign ? Thanks to Google Analytics ?

Thank you for your answers

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Issue connecting Hubspot embed form with Google Analytics

Hi @Guillaume_Coudreuse,

That make sense, thanks for clarifying. Did updating the tracker name work?

0 Upvotes
Not applicable

Issue connecting Hubspot embed form with Google Analytics

Hi Derek,

It's hidden because we want the form to be showned only if a lead is clicking on the CTA corresponding to the form.

I just changed the ga to __gaTracker as you suggested on the page you mentionned. I saw that you submitted the form to try it.

Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Issue connecting Hubspot embed form with Google Analytics

Hi @Guillaume_Coudreuse,

So I checked out that page, and the first thing I'm noticing is that the section with that form is being hidden. Is it hidden because the event tracking isn't working? Regardless, looking at the page's source code I can see that the Google Analytics code you have installed creates a tracker that is named __gaTracker instead of the traditional ga. Can you update your form embed code's onFormSubmit function to call __gaTracker instead of ga?

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Issue connecting Hubspot embed form with Google Analytics

Hi @Guillaume_Coudreuse,

Where is that code located? Is that placed before the GA initialization script? Can you send me a link to the page in question so that I can do some testing?

0 Upvotes
Not applicable

Issue connecting Hubspot embed form with Google Analytics

Hi Derek,

The code is located directly into the page. It's a custom html option in Wordpress so I don't know if it's located before or after the GA script.

Yeah sure here is the link : https://www.neofab.fr/markforged/metal-x/

Thanks

0 Upvotes