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.
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
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
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?
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
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.
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.
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.