Lead Capture Tools

DZwier
Member

Hidden fields in Pop Up Forms

SOLVE

Hello!

 

We have pop-up form live on our website. I have added some hidden field to the form (ga_client_id, hubspot_utk & submission_id) so that I can connect any form submission to our digital performance. However, when I look into the HTML of the iFrame that is used for this pop-up, those fields are not added.

 

Please note that there is another form embedded on the page (newsletter subscribe) where the fields are added.

 

How can I solve this?

 

Thanks. 

0 Upvotes
1 Accepted solution
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Hidden fields in Pop Up Forms

SOLVE

Hmm, I haven't see anyone passing GTM data into a HubSpot iframe before to be honest, however it's not out of the box supported. So I would be confident it's to do with the way you're implementing this customisation. 

It's difficult to say without being familiar with your setup, but I would assume it's a race condition of some sort where your customisation is passing data to the iframe after the form has loaded within the iframe so the form isn't getting the data on load. 

 

From my experience this isn't something that would be supported at all, however if you have developed a custom script to pass data into the iframe I'd look into this code further and how it interacts with the iframe to troubleshoot further. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


View solution in original post

8 Replies 8
TomM2
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Hidden fields in Pop Up Forms

SOLVE

Hey @DZwier  this is currently due to how the pop-up forms are implemented. They're added via an iframe as you outlined, hidden fields being populated through query strings can not pass information to an iframe inside a page as the iframe is essentially a different web page embedded in your web page, the url information can't "reach in" to pass information. 

 

Since it's not possible to embed a pop-up form outside of an iframe (at the moment) this wouldn't be compatible with pop-ups. You would need to create your own pop-ups through custom development to use query strings with it, or potentially create a custom script to pass information to your hidden pop-up fields (although I'm not sure if this would be possible). 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


DZwier
Member

Hidden fields in Pop Up Forms

SOLVE

Hi Tom,

 

Thanks for your reply. I understand what you mention here. However, we do have the possibility to add Google Tag Manager within the iFrame, so possible we can have a workaround here to send data from the parent page to the iFrame. The problem however is that hidden fields are not set by Hubspot in this form. Therefore, even when manage to do the first, we are still not able to do the latter send the data to Hubspot. Any idea's on this? Is it a bug or something?

0 Upvotes
TomM2
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Hidden fields in Pop Up Forms

SOLVE

Hey @DZwier  how exactly are you populating the hidden fields if it's not from the page URL? I haven't seen it done through GTM before. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


DZwier
Member

Hidden fields in Pop Up Forms

SOLVE

Hey @TomM2. you can do that by manipulating the HTML. Of course, the hidden data fields needs to be configured in Hubspot, and be present in the form HTML (which they are not in the case of this discussion). How to: https://medium.com/@SNeefischer/how-to-connect-hubspot-with-google-analytics-4-via-client-id-8d414ef... 

0 Upvotes
TomM2
Solution
Thought Leader | Platinum Partner
Thought Leader | Platinum Partner

Hidden fields in Pop Up Forms

SOLVE

Hmm, I haven't see anyone passing GTM data into a HubSpot iframe before to be honest, however it's not out of the box supported. So I would be confident it's to do with the way you're implementing this customisation. 

It's difficult to say without being familiar with your setup, but I would assume it's a race condition of some sort where your customisation is passing data to the iframe after the form has loaded within the iframe so the form isn't getting the data on load. 

 

From my experience this isn't something that would be supported at all, however if you have developed a custom script to pass data into the iframe I'd look into this code further and how it interacts with the iframe to troubleshoot further. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


BérangèreL
Community Manager
Community Manager

Hidden fields in Pop Up Forms

SOLVE

Hi @DZwier, I hope that you are well!

Great question, thanks for asking the Community!

I'd like to ask clarifying questions to make sure I understand the behavior:

1. Is the popup form a HubSpot form? Or an external form?
2. If the website hosted on HubSpot or an external website?
3. If it is a HubSpot form, have you checked this article "Troubleshoot HubSpot forms"
4. What is the URL of the website so that we can have access to the HTML code if needed

The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.

I found similar threads that might help you:

- The solution from @elizheleva on this post "Pop Ups are not passing hidden fields"
- The solution from @MatthewShepherd on this post "Pop-up Form within <form> tags are not getting submitted in Hubspot"

I'd like to also invite some of our Top Experts to this conversation: Hi @Mike_Eastwood, @ArtyCele@TomM2 and @Jnix284 do you have tips to help @DZwier, please?

Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 🙂

Thank you so much ❤️ and have a brilliant day!

Best,
Bérangère


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres! !
DZwier
Member

Hidden fields in Pop Up Forms

SOLVE

I send a DM with the HTML details since it contains confidential information. Could you might help me overthere? Thanks in advance!

0 Upvotes
BérangèreL
Community Manager
Community Manager

Hidden fields in Pop Up Forms

SOLVE

Hi @DZwier,

Sorry for the delay in the response.

Thanks so much @TomM2 for your help on this!

Since it is a customized code, I would recommend posting in the Developers Forum to get more visibility and help.

Please share the information you sent me via DM (hiding any sensitive/private information).
The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.


Thank you and have a great day!

Best,
Bérangère


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres! !
0 Upvotes