APIs & Integrations

Tristan_Boyd
Member

Google Analytics event in Hubspot form on Hubspot platform

SOLVE

We are moving our landing pages from Wordpress across to Hubspot and I need to replicate our Google analytics event tracking.

This is the event that needs to trigger. ga(‘send’, ‘event’, ‘form’, ‘submit’, ‘dev_report’);

It needs to fire on the form on this landing page (hosted by hubspot) - http://go.bitmovin.com/download-the-bitmovin-2018-video-developer-report

How do I insert that code in the HubSpot admin system?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Google Analytics event in Hubspot form on Hubspot platform

SOLVE

Hi @Tristan_Boyd,

Since that form redirects to a file URL, you'll have to embed the Google Analytics event tracking tag within the form embed code.

While it's not possible to modify the embed code in the existing Form module, you can use a Custom HTML module instead. With access to the form's embed code, add the GA event within the onFormSubmit method, as outlined in this article.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Google Analytics event in Hubspot form on Hubspot platform

SOLVE

Hi @Tristan_Boyd,

Since that form redirects to a file URL, you'll have to embed the Google Analytics event tracking tag within the form embed code.

While it's not possible to modify the embed code in the existing Form module, you can use a Custom HTML module instead. With access to the form's embed code, add the GA event within the onFormSubmit method, as outlined in this article.

Isaac Takushi

Associate Certification Manager
0 Upvotes