<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic UTM Hidden fields on Hubspot Form not being populated in Lead Capture Tools</title>
    <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1151893#M12889</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We're using hubspot forms on our website (we use Webflow). The UTM customer properties have been added as hidden fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tested the following use case: A user comes in through Google ads and on the landing page clicks on the CTA which redirects the user to another page with the contact form. Once a user submits the contact form, we see that these utm properties were not being populated with the parameters for new contacts (The original and latest traffic source fields are being populated with the UTMs). We also noticed that the UTMs are not being carried forward to the page with the contact form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Through GTM, we've tried the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Use the Persist Campaign Data template to store the UTM&lt;/P&gt;&lt;P&gt;parameters in a cookie.&lt;BR /&gt;- Use a custom HTML tag that reads the UTM values from the cookie and sets them as values of the hidden fields before the form is submitted. This tag fires after the form loads on the contact page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the tags are firing, the utm fields are still not being populated which means that neither the utm custom properties on Hubspot aren't being populated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue seems to be that since the form is located inside an iFrame, the GTM scripts won't be able to set or read values in the form fields inside the iFrame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One suggestion has been to enable the Raw HTML form setting but this is something our website team wants to avoid because of styling issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any potential workarounds for this case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2025 13:25:17 GMT</pubDate>
    <dc:creator>DeeCee</dc:creator>
    <dc:date>2025-05-13T13:25:17Z</dc:date>
    <item>
      <title>UTM Hidden fields on Hubspot Form not being populated</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1151893#M12889</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We're using hubspot forms on our website (we use Webflow). The UTM customer properties have been added as hidden fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tested the following use case: A user comes in through Google ads and on the landing page clicks on the CTA which redirects the user to another page with the contact form. Once a user submits the contact form, we see that these utm properties were not being populated with the parameters for new contacts (The original and latest traffic source fields are being populated with the UTMs). We also noticed that the UTMs are not being carried forward to the page with the contact form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Through GTM, we've tried the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Use the Persist Campaign Data template to store the UTM&lt;/P&gt;&lt;P&gt;parameters in a cookie.&lt;BR /&gt;- Use a custom HTML tag that reads the UTM values from the cookie and sets them as values of the hidden fields before the form is submitted. This tag fires after the form loads on the contact page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the tags are firing, the utm fields are still not being populated which means that neither the utm custom properties on Hubspot aren't being populated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue seems to be that since the form is located inside an iFrame, the GTM scripts won't be able to set or read values in the form fields inside the iFrame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One suggestion has been to enable the Raw HTML form setting but this is something our website team wants to avoid because of styling issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any potential workarounds for this case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 13:25:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1151893#M12889</guid>
      <dc:creator>DeeCee</dc:creator>
      <dc:date>2025-05-13T13:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: UTM Hidden fields on Hubspot Form not being populated</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1152126#M12891</link>
      <description>&lt;P&gt;Not 100% sure I'm tracking, but the easiest thing for me to check would be for you to provide an example link. I see potential issues with trying to persist the UTM parameters through the button click, with the form being iframed, misconfigured hidden fields that should be capturing the UTM parameters, and with your cookie permissions, any one of which could make this not function correctly. Normally I don't like trying to persist parameters via UTM because they can create storage issues for all those reasons, and would recommend you fire those custom variables via javascript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can't provide a link, can you confirm:&lt;/P&gt;&lt;P&gt;1) Are the correct UTM parameters you're looking for still firing on the page with the form submission, wherever that happens.&lt;/P&gt;&lt;P&gt;2) When you look at the submissions is anything coming through in the non-iframed form if you force through a utm parameter by manually adding it to the URL when you directly load the form?&lt;/P&gt;&lt;P&gt;3) When you go into dev mode and test the GTM scripts, are they correctly populating the values, whether or not they make it onto the form submission?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If my reply answered your question&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;please mark it as a solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to make it easier for others to find.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chris Chin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A class="" href="https://www.localleafmarketing.com/" target="_blank" rel="noopener nofollow noreferrer"&gt;Local Leaf Marketing&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A class="" href="https://meetings.hubspot.com/chrisc39" target="_blank" rel="noopener noreferrer"&gt;Book a call with Chris&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 01:33:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1152126#M12891</guid>
      <dc:creator>ChrisChin_LLF</dc:creator>
      <dc:date>2025-05-14T01:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: UTM Hidden fields on Hubspot Form not being populated</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1232439#M13439</link>
      <description>&lt;P&gt;Hi, I have the same issue. I made updates in my GTM but adding custom HTML so that cookie persistence happens. All my regular forms are capturing utms well even though users navigate to other pages in between landing and form submission. But my pop-up forms are not capturing this. I have checked the console and see that the utms are being captured in the cookie but when checking if the fields are there, none show up. I have used&amp;nbsp;document.querySelectorAll('input[name^="utm"]') to check this.&amp;nbsp;&lt;BR /&gt;I am not a developer and using claude's help to fix this but haven't found any solution yet.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 19:26:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1232439#M13439</guid>
      <dc:creator>RalphM87</dc:creator>
      <dc:date>2025-12-09T19:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: UTM Hidden fields on Hubspot Form not being populated</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1232496#M13441</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/831823"&gt;@RalphM87&lt;/a&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for joining the discussion!&lt;/P&gt;
&lt;P&gt;I want to tag in &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/933055"&gt;@ChrisChin_LLF&lt;/a&gt;&lt;/SPAN&gt; to see if he has any specific thoughts on the pop-up form nuance here, as he provided some great insight for the original poster. Chris — do you have any thoughts on how GTM scripts interact specifically with the pop-up form architecture compared to embedded forms? I'll tag in some other champions as well if we don't hear back.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While we wait for further insight, could you please provide a link to the page where the pop-up is live? As Chris mentioned earlier, seeing the live environment is often the best way to troubleshoot.&lt;/P&gt;
&lt;P&gt;Additionally, since pop-up forms often load dynamically after the initial page load (unlike standard embedded forms), scripts set to fire on “Page Load” or “DOM Ready” might be executing before the pop-up form fields actually exist in the DOM. You may need to investigate whether your script can be triggered by the form rendering event, rather than just the initial page load.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Dec 2025 00:51:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1232496#M13441</guid>
      <dc:creator>SealaB</dc:creator>
      <dc:date>2025-12-10T00:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: UTM Hidden fields on Hubspot Form not being populated</title>
      <link>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1255721#M13599</link>
      <description>&lt;P class=""&gt;Yeah this is a common issue with HubSpot forms. Because the standard HubSpot form embed loads inside an iframe, any scripts running on your parent page (including GTM tags) can't access or modify the form fields inside it. That's a browser security restriction, so no amount of GTM configuration will get around it.&lt;/P&gt;&lt;P class=""&gt;You basically have three options.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The first is to switch to HubSpot's Raw HTML form embed, which removes the iframe and lets your GTM scripts interact with the form fields directly. I know your web team wants to avoid this because of styling issues though.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The second is to embed the form directly on the landing page so the UTMs are still in the URL when the form is submitted. HubSpot can capture UTMs natively, but only if they're present in the URL at the time of submission. Once the user clicks your CTA and navigates to another page, those UTMs are gone.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The third option is to use a tool like Attributer.io (disclosure: I am the founder). It works differently to the GTM approach you've tried. It captures UTM parameters when the visitor first arrives, stores them in a first-party cookie, and then writes them into hidden fields on your HubSpot form at the time of submission. It works with the standard iframe embed, so no need to switch to Raw HTML. Plus as a little extra, you'd also get attribution data on organic visitors (Organic Search, Organic Social, Direct, etc.) and things like the Google Click ID and landing page URL.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Hope this helps&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;Aaron&lt;BR /&gt;&lt;BR /&gt;P.S I used AI to help me be more concise with the wording of this post (I tend to ramble) and HubSpot requires me to disclose that. The above comments was reviewed by me and was based on my actual knowledge of how these things work.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 03:14:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Lead-Capture-Tools/UTM-Hidden-fields-on-Hubspot-Form-not-being-populated/m-p/1255721#M13599</guid>
      <dc:creator>azisbak</dc:creator>
      <dc:date>2026-03-04T03:14:32Z</dc:date>
    </item>
  </channel>
</rss>

