Lead Capture Tools

SParvin
参加者

Form ID keeps changing ** How to make Form IDs Persist?**

解決

I have a lead form that is only used on one page. It's the only form on the page and was added through the content editor.

Our Google Analytics tracking is setup (through Google Tag Manager) to capture the Form ID and my goal tracking keeps breaking because there is no consistent way to identify that the form was submitted.

 

I have noticed that the ID of the form on that page is changing several times per week (more often than the updates to the page)

 

All of the documentation I have seen says that the FormID should persist and any possible workarounds require that the form be embedded instead of being added through the content editor.

 

Why is the FormID changing randomly and how do I get it to persist?

 

Page: https://enrollme.health/lets-meet-up

 

 

0 いいね!
2件の承認済みベストアンサー
Mike_Eastwood
解決策
キーアドバイザー | Gold Partner
キーアドバイザー | Gold Partner

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Hi @SParvin 

 

Try targeting the Form ID in the Data Attribute.

 

data-form-id="2740af13-cfce-40d2-a95c-c9b0130b1a24"

 

The Form ID is the same ("2740af13-cfce-40d2-a95c-c9b0130b1a24") in every submission, but the tag you are using (understandably, because it is labelled "id") concatenates "hsForm_" + the id + "_XXXX" (looks like a random number).

 

An ID always must be unique so (I assume HubSpot) wraps the ID with a variable so when multiple forms are on the same page so there are no collisions with IDs.

 

Does that fix it?

Mike

元の投稿で解決策を見る

SParvin
解決策
参加者

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Mike,

         as I was providing that, I realized that in order to make this work, I just needed to figure out how to trim the _XXXX off the end of the FormID being captured.

 

I was able to create a script in Google Tag Manager to trim it and so now I'm at least synthesizing a unique formID from the form submission. 

 

元の投稿で解決策を見る

6件の返信
Mike_Eastwood
解決策
キーアドバイザー | Gold Partner
キーアドバイザー | Gold Partner

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Hi @SParvin 

 

Try targeting the Form ID in the Data Attribute.

 

data-form-id="2740af13-cfce-40d2-a95c-c9b0130b1a24"

 

The Form ID is the same ("2740af13-cfce-40d2-a95c-c9b0130b1a24") in every submission, but the tag you are using (understandably, because it is labelled "id") concatenates "hsForm_" + the id + "_XXXX" (looks like a random number).

 

An ID always must be unique so (I assume HubSpot) wraps the ID with a variable so when multiple forms are on the same page so there are no collisions with IDs.

 

Does that fix it?

Mike

SParvin
解決策
参加者

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Mike,

         as I was providing that, I realized that in order to make this work, I just needed to figure out how to trim the _XXXX off the end of the FormID being captured.

 

I was able to create a script in Google Tag Manager to trim it and so now I'm at least synthesizing a unique formID from the form submission. 

 

pnguyen5
メンバー

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Hi SParvin, 

 

Can you share the steps you did to setup this up in GTM? Thanks 

 

0 いいね!
Mike_Eastwood
キーアドバイザー | Gold Partner
キーアドバイザー | Gold Partner

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Hi @SParvin 

 

The Form ID is always the same, with all forms, because the Form ID is used to render the form.

 

I recommend using redirect on form submission, to a Thank You Page, for Google Analytics Goals and Adwords Conversion Tracking. Trigger the goal when they land on the Thank You Page (from the form).

 

Have fun

Mike

 

 

SParvin
参加者

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Mike,

       I'm doing the thank you page as a temporary solution but want to map the ID to an event name so that my events also contain the form completions and I can register submissions from different versions of the form as the same goal (for testing). I was able to do this before but as mentioned the ID changes randomly.

 

See the attached screenshot showing that one form on the same page changed IDs more than 10-times in less than 2-months.

 

formid-changing.jpg

0 いいね!
kvlschaefer
コミュニティーマネージャー
コミュニティーマネージャー

Form ID keeps changing ** How to make Form IDs Persist?**

解決

Hi @SParvin,

 

Thanks for reaching out to the Community!

 

I would like to add our subject matter experts to this conversation to see if they have advice.

Hi @Ben_M@Mike_Eastwood@ConnorSlivensky - Do you have any recommendations for @SParvin?

Thank you!

 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 いいね!