<?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: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages in Tips, Tricks &amp; Best Practices</title>
    <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056282#M6178</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some advice on &lt;STRONG&gt;capturing URLs in a form.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have two event landing pages hosted on a different platform (not HubSpot). Our goal is to use a single form across both pages so we don’t have to create new forms every time we host an event. We’ll likely be doing this regularly in the future, so we want to streamline the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;challenge is that we still want to separate the data for reporting and create lists&lt;/STRONG&gt; so we can use workflows in HubSpot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here’s what we’ve done so far:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We created a property in HubSpot called "website url" and added it to the form as a hidden field.&lt;/LI&gt;&lt;LI&gt;Since the event landing pages are hosted elsewhere, we used JavaScript to dynamically load the site URL into the hidden "website url" field.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This solution works—we’re able to create lists and generate reports from the data. However, I wanted to check if anyone has found a better way to do this or if you foresee any issues with embedding the script below on both pages?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="&lt;A href="https://js.hsforms.net/forms/embed/v2.js" target="_blank"&gt;https://js.hsforms.net/forms/embed/v2.js&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "XXXX",&lt;BR /&gt;portalId: "XXXXX",&lt;BR /&gt;formId: "XXXXXX",&lt;BR /&gt;&lt;BR /&gt;onFormReady: function($form) {&lt;BR /&gt;function setWebsiteField() {&lt;BR /&gt;var currentPageUrl = window.location.href;&lt;BR /&gt;$form.find('input[name="website"]').val(currentPageUrl);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var intervalId = setInterval(setWebsiteField, 500);&lt;/P&gt;&lt;P&gt;$form.on('submit', function() {&lt;BR /&gt;clearInterval(intervalId);&lt;BR /&gt;setWebsiteField();&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 08:40:45 GMT</pubDate>
    <dc:creator>LK8</dc:creator>
    <dc:date>2024-10-17T08:40:45Z</dc:date>
    <item>
      <title>RE: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages</title>
      <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056282#M6178</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for some advice on &lt;STRONG&gt;capturing URLs in a form.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have two event landing pages hosted on a different platform (not HubSpot). Our goal is to use a single form across both pages so we don’t have to create new forms every time we host an event. We’ll likely be doing this regularly in the future, so we want to streamline the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;challenge is that we still want to separate the data for reporting and create lists&lt;/STRONG&gt; so we can use workflows in HubSpot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here’s what we’ve done so far:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We created a property in HubSpot called "website url" and added it to the form as a hidden field.&lt;/LI&gt;&lt;LI&gt;Since the event landing pages are hosted elsewhere, we used JavaScript to dynamically load the site URL into the hidden "website url" field.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This solution works—we’re able to create lists and generate reports from the data. However, I wanted to check if anyone has found a better way to do this or if you foresee any issues with embedding the script below on both pages?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="&lt;A href="https://js.hsforms.net/forms/embed/v2.js" target="_blank"&gt;https://js.hsforms.net/forms/embed/v2.js&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;hbspt.forms.create({&lt;BR /&gt;region: "XXXX",&lt;BR /&gt;portalId: "XXXXX",&lt;BR /&gt;formId: "XXXXXX",&lt;BR /&gt;&lt;BR /&gt;onFormReady: function($form) {&lt;BR /&gt;function setWebsiteField() {&lt;BR /&gt;var currentPageUrl = window.location.href;&lt;BR /&gt;$form.find('input[name="website"]').val(currentPageUrl);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var intervalId = setInterval(setWebsiteField, 500);&lt;/P&gt;&lt;P&gt;$form.on('submit', function() {&lt;BR /&gt;clearInterval(intervalId);&lt;BR /&gt;setWebsiteField();&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 08:40:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056282#M6178</guid>
      <dc:creator>LK8</dc:creator>
      <dc:date>2024-10-17T08:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: RE: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages</title>
      <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056306#M6180</link>
      <description>&lt;P&gt;Did you try UTMs? This is exactly what they are supposed to do: help you diffrintiate where the contact is coming from, specially when these pages are external to HubSPot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 09:35:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056306#M6180</guid>
      <dc:creator>Ktamir</dc:creator>
      <dc:date>2024-10-17T09:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: RE: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages</title>
      <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056657#M6183</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/221889"&gt;@Ktamir&lt;/a&gt;&amp;nbsp;- thanks for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, we're using UTMs also. We have a main page also with a link to both events, so unfortunately the UTMs will drop off when they navigate to the next pages.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 20:44:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056657#M6183</guid>
      <dc:creator>LK8</dc:creator>
      <dc:date>2024-10-17T20:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: RE: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages</title>
      <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056729#M6185</link>
      <description>&lt;P&gt;Just a quick update on this, I had a chat with a developer and they said it's the best solution for now! But open to any other comments if you have suggestions.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 00:14:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1056729#M6185</guid>
      <dc:creator>LK8</dc:creator>
      <dc:date>2024-10-18T00:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: RE: Best Practices for Capturing URL Data in HubSpot Forms on External Landing Pages</title>
      <link>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1087161#M6628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It looks like you've implemented a solid solution with the hidden field and JavaScript for capturing the URL. One potential improvement could be using HubSpot's built-in tracking capabilities with UTM parameters to track different campaigns or pages more efficiently. If you're using multiple event landing pages, you could dynamically append UTM parameters to the URLs to help with segmentation.&lt;/P&gt;&lt;P&gt;Otherwise, your current approach seems effective, and if the script is functioning as expected without issues, it should work well for your needs!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 05:11:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/RE-Best-Practices-for-Capturing-URL-Data-in-HubSpot-Forms-on/m-p/1087161#M6628</guid>
      <dc:creator>amjad34</dc:creator>
      <dc:date>2024-12-26T05:11:35Z</dc:date>
    </item>
  </channel>
</rss>

