<?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 Re: Forms API for ad attribution in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1235876#M86254</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/989626"&gt;@SeanCallahan&lt;/a&gt;&lt;/SPAN&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much for updating us on what worked for you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also big thanks to &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/537570"&gt;@RubenBurdin&lt;/a&gt;&lt;/SPAN&gt; and &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/945160"&gt;@BrandonWoodruff&lt;/a&gt;&lt;/SPAN&gt; for your help here so far! Would either of you happen to have any suggestions regarding &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/989626"&gt;@SeanCallahan&lt;/a&gt;&lt;/SPAN&gt;'s most recent question around what might be the most &lt;U&gt;reliable &lt;/U&gt;approach here?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam, Community Manager&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Dec 2025 22:06:39 GMT</pubDate>
    <dc:creator>SamTassey</dc:creator>
    <dc:date>2025-12-19T22:06:39Z</dc:date>
    <item>
      <title>Forms API for ad attribution</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1230096#M85869</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking to get meta and google ad attribution working on a non-hubspot checkout form in BigCommerce. I was told by a hubspot customer service representitive that the Hubspot forms API should be used for this purpose to get ad attribution in the built in reporting tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;She stated:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Since the checkout page’s form isn’t a HubSpot Form and can’t be set up as a non-HubSpot form, the best option would be to use the Forms API. With this approach, make sure to include both the page URL and the HubSpot tracking cookie in your API submission to capture everything correctly".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've reviewed the forms API docs here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api-reference/legacy/forms-v3-legacy/post-submissions-v3-integration-secure-submit-portalId-formGuid" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api-reference/legacy/forms-v3-legacy/post-submissions-v3-integration-secure-submit-portalId-formGuid&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's unclear to me how to structure the payload to include UTM params and cookie data. Am I meant to create custom properties on a deal and match the property name in the forms API payload under the "fields" key,&amp;nbsp;or is there some other method? I'm assuming the attribution would be done automatically by matching a clickID stored in the cookie and sent via the forms API with the Ad campign's clickID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're already pulling in the ads and seeing the data from the ad platforms, I just need a little clarification on how I'm intended to send the payload to do the attribution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 23:59:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1230096#M85869</guid>
      <dc:creator>SeanCallahan</dc:creator>
      <dc:date>2025-12-01T23:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Forms API for ad attribution</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1230306#M85881</link>
      <description>&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I see, I think you are on the right track. Here are some approaches you can look at:&lt;BR /&gt;- Use the Forms API with the tracking cookie and full page URL so HubSpot can interpret UTMs and click data automatically.&lt;BR /&gt;- Optionally add custom contact properties for UTMs if you want more flexible reporting&lt;BR /&gt;- Skip creating deal level fields unless you have a specific reason since HubSpot Ads attribution is contact driven.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if this helps, or if you have any other questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Was I able to help answer your question? Help the community by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;marking it as a solution.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20.365535248041773%" height="191px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_0-1764686718171.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/162948i8C3A31497F1788ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrandonWoodruff_0-1764686718171.jpeg" alt="BrandonWoodruff_0-1764686718171.jpeg" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD width="79.50391644908615%" height="191px"&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/brandon-woody-woodruff/" target="_blank" rel="noopener nofollow noreferrer"&gt;Brandon Woodruff&lt;/A&gt;&lt;BR /&gt;&lt;/STRONG&gt;Senior Software Developer @&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.pearagon.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;Pearagon&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Still have questions? Reach out at&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:brandon@pearagon.com" target="_blank" rel="noopener nofollow noreferrer"&gt;brandon@pearagon.com&lt;/A&gt;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrandonWoodruff_1-1764686717928.png" style="width: 200px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/162947i7F5D8234DC353B94/image-size/small?v=v2&amp;amp;px=200" role="button" title="BrandonWoodruff_1-1764686717928.png" alt="BrandonWoodruff_1-1764686717928.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 14:45:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1230306#M85881</guid>
      <dc:creator>BrandonWoodruff</dc:creator>
      <dc:date>2025-12-02T14:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Forms API for ad attribution</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1234137#M86131</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/989626"&gt;@SeanCallahan&lt;/a&gt;&amp;nbsp;, you’re thinking about it the right way. With the Forms API, you don’t “send UTMs” as a special object. You send a normal form submission (fields), plus a context that contains the HubSpot tracking cookie (hutk) and the page URL (pageUri).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HubSpot uses that to connect the submission back to the visitor session and pick up click IDs and attribution automatically. The payload shape and the context fields are documented here (&lt;A href="https://developers.hubspot.com/docs/api-reference/legacy/forms-v3-legacy/post-submissions-v3-integration-secure-submit-portalId-formGuid" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/legacy/forms-v3-legacy/post-submissions-v3-integration-secure-submit-portalId-formGuid&lt;/A&gt; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For attribution specifically, HubSpot calls out that if you use the Forms API, you must pass the page URL and tracking cookie, and you still need the HubSpot tracking code present on the pages where the ad click lands so the cookie/session exist in the first place (&lt;A href="https://knowledge.hubspot.com/ads/ads-attribution-in-hubspot" target="_blank"&gt;https://knowledge.hubspot.com/ads/ads-attribution-in-hubspot&lt;/A&gt; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the key is: make sure context.pageUri is the full URL you want attributed (ideally including the querystring with utm_*, gclid, etc.), and context.hutk is the browser’s hubspotutk cookie value from that same user.&lt;/P&gt;
&lt;P&gt;One quick question that changes the implementation: are you posting to the Forms API from the browser (client-side) or from your server? If it’s server-side, you’ll need to explicitly capture and forward the user’s hubspotutk and the original landing URL, because the server won’t have them by default.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 19:36:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1234137#M86131</guid>
      <dc:creator>RubenBurdin</dc:creator>
      <dc:date>2025-12-15T19:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Forms API for ad attribution</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1235858#M86252</link>
      <description>&lt;P&gt;Thanks, that all makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It wasn't quite clear to me that hubspot does the attribution in the background based on the cookie and page data via a form submission. I set up a front end form submission via the unauthenticated API on my order confirmation page and I do see some attribution now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I've confirmed this is working the next step will be to submit to the authenticated API via our integrations server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get this set up for testing:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I created a sandboxed hubspot form with just the email property from a contact.&lt;/LI&gt;&lt;LI&gt;Note the portal and form ID for use in the form submission logic.&lt;/LI&gt;&lt;LI&gt;Impliment logic to submit the form on the order confirmation page of the webstore&amp;nbsp; and include at a minimum:&lt;UL&gt;&lt;LI&gt;Customer email&lt;/LI&gt;&lt;LI&gt;Hubspot cookie value from the&amp;nbsp;&lt;SPAN&gt;hubspotutk&lt;/SPAN&gt;&amp;nbsp;cookie&lt;/LI&gt;&lt;LI&gt;Page URL&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;During testing use private windows and ensure you have a new hubspot cookie set, and use a fresh email address for a contact.&lt;/LI&gt;&lt;LI&gt;You can simulate an ad click by taking the utm params from your ad and appending them to a url you visit in your browser before submitting an order.&lt;/LI&gt;&lt;LI&gt;Check hubspot form submissions for your attribution form and make sure it was successful.&lt;/LI&gt;&lt;LI&gt;Check the contact record properties for conversion information such as Google and Facebook click ID, IP address data, Recent conversion, etc.&lt;/LI&gt;&lt;LI&gt;Look at your ads and ensure there's a contact and revenue attribution&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;A few issues I've noticed,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Often click IDs are not set or set inconsistently however attributrion seems to mostly work regardless.&lt;/LI&gt;&lt;LI&gt;Sometimes there is timeline activity for ad clicks and a deal associated to a contact but the attribution does not work.&lt;/LI&gt;&lt;LI&gt;I've seen a few duplicate form submissions, perhaps if the page is refreshed. It would be advisable to prevent duplicate submissions.&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;Alternate email addresses on a contact can cause mis-attribution (split between contacts) and using the same hubspot cookie but testing with multiple emails will tend to attribute to the first contact to have that cookie ID set.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if it's significanlty more reliable to submit the attribution form server to server? Given that I see timeline activity and a deal but sometimes not attribution, this would indicate that the hubspot tracking script and cookies are not an issue but the form submission could be unreliable.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 20:44:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1235858#M86252</guid>
      <dc:creator>SeanCallahan</dc:creator>
      <dc:date>2025-12-19T20:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Forms API for ad attribution</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1235876#M86254</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/989626"&gt;@SeanCallahan&lt;/a&gt;&lt;/SPAN&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks so much for updating us on what worked for you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also big thanks to &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/537570"&gt;@RubenBurdin&lt;/a&gt;&lt;/SPAN&gt; and &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/945160"&gt;@BrandonWoodruff&lt;/a&gt;&lt;/SPAN&gt; for your help here so far! Would either of you happen to have any suggestions regarding &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/989626"&gt;@SeanCallahan&lt;/a&gt;&lt;/SPAN&gt;'s most recent question around what might be the most &lt;U&gt;reliable &lt;/U&gt;approach here?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam, Community Manager&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 22:06:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Forms-API-for-ad-attribution/m-p/1235876#M86254</guid>
      <dc:creator>SamTassey</dc:creator>
      <dc:date>2025-12-19T22:06:39Z</dc:date>
    </item>
  </channel>
</rss>

