Send Data from a HubSpot Form to Advocate

Once you’ve integrated Advocate with HubSpot, you can automatically track referrals with HubSpot forms. Referrals are tracked by placing a cookie on the website that your referral form is on. Brands using other setups will need to add the UTT to their landing page.

An active HubSpot integration is required to send data from HubSpot Forms to Advocate. Refer to Integrate with HubSpot for Advocate to get started.

Step 1: Create a lead capture form in HubSpot

  1. In HubSpot, create a lead capture form.
    • Skip this step if you have an existing lead capture form you want to use.
  2. Make sure your form contains a field for impact_referralcookies. We recommend hiding this field from the interface.

Step 2: Copy your UTT

  1. From the left navigation menu, select Menu → Settings.
  2. On the right, below Program → Tracking, select General.
  3. Copy your UTT and save it somewhere you can easily access it, like a notepad app.

Step 3: Generate your referral attribution script

  1. In your impact.com account, from the left navigation menu, select Menu → Settings.
  2. On the left, below Advocate Settings, select Install.
  3. In the Use referral cookies section, select whether you’re using a HubSpot landing page or a custom landing page.
  4. Copy the resulting referral attribution script and save it somewhere you can easily access it, like a notepad app.

Step 4: Set up your landing page

Next, continue based on which type of landing page you're using.

HubSpot landing page

Note: Not all HubSpot landing pages support adding custom code. If yours does not, then you’ll need to use another type of landing page.

  1. In HubSpot, go to your landing page’s settings.
  2. Expand the advanced options.
  3. In the Additional code snippets box, add the UTT and the referral attribution script.
  4. Save your changes.

Custom landing page

  1. Paste the UTT and the referral attribution script on your landing page.
  2. In HubSpot, go to your form settings.
  3. Select Embed and find the region, portalId, and formId values.
  4. Paste them into the referral attribution script on your landing page. There are instructions in the script to show you where to add this information.

Step 5: Optionally, test the form

Optionally, submit test information to the form to confirm that it’s properly attributing referrals. Make sure that:

  • The lead is created as a new Advocate participant, if you’re using this data sharing rule.
  • The contact in HubSpot contains Advocate properties like referral code, share link and message links.

Learn more