Blog, Website & Page Publishing

davidrichard3
Member

HubSpot form differentiate by name not only ID

SOLVE

I'm using the generated script for creating a HubSpot Form. However, I would like to have different name for each of the forms I'd use (i need this for use in Google Analytics).  Currently all I have to distinguish them is the ID, is there a way to add name as well?

gzolehana

1 Accepted solution
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

HubSpot form differentiate by name not only ID

SOLVE

Hi @davidrichard3 ,

Hubspot forms not provide the option to add the custom id or class. you can set up the event in the gtm dashboard and can add the current class of the form. Please Refer:- https://www.hallaminternet.com/using-google-analytics-event-tracking/
https://medium.com/@dillonjones/the-easiest-way-to-setup-hubspot-form-tracking-in-google-analytics-a...

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

View solution in original post

3 Replies 3
codeandtonichq
Contributor

HubSpot form differentiate by name not only ID

SOLVE

If you're 

A) Embedding the forms on your website
B) Only have 1 form per a page 

This tutorial should work fantastically. Basically instead of the form name, it send the url page path ( in example.com/contact-form-page it would be "/contact-form-page") to Google Analytics. So you could differentiate between forms by where they are in your website. 

I'll look into this deeper and try to update my blogpost if I find a better way. 

0 Upvotes
CSong4
Member

HubSpot form differentiate by name not only ID

SOLVE

In hubspot shape I am also dealing with the same problem even as making it and want to recognize am I doing some thing wrong or there may be an errors in the code? please help  me I am still waiting.

0 Upvotes
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

HubSpot form differentiate by name not only ID

SOLVE

Hi @davidrichard3 ,

Hubspot forms not provide the option to add the custom id or class. you can set up the event in the gtm dashboard and can add the current class of the form. Please Refer:- https://www.hallaminternet.com/using-google-analytics-event-tracking/
https://medium.com/@dillonjones/the-easiest-way-to-setup-hubspot-form-tracking-in-google-analytics-a...

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.