For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrate with HubSpot for Advocate

This guide covers the HubSpot integration for Advocate programs, supporting standard HubSpot objects: Deals, Companies, and Contacts.

Prerequisites

Use this guide to help you set up HubSpot integration for Advocate when:

  • You already have a Performance or Creator program.

  • You have cross-program tracking enabled between your Advocate and Performance programs, and use an existing performance conversion event shared with Advocate.

  • You're adding a new Advocate program from the in-app prompt and checklist.

1

Connect and configure HubSpot

Initial integration setup

If you are setting up your HubSpot integration for the first time, you must complete the following steps.


Connect and configure the HubSpot integration

Advocate adds special settings to your impact.com HubSpot integration. If you haven't set up the integration yet, follow our Integrate with HubSpot guide to do the following. Then, return to this section for Advocate-specific setup steps.

  1. Install and connect the impact.com app in HubSpot.

    • On the Settings page in the connector, make sure you toggle on Advocate Program opt-in.

  2. Enable event triggers. Configure field mappings.

    1. For Advocate, you must set up a few specific field mappings for the Deals object.

    2. You must pass the ClickId field on the conversion so it maps to your participants.

    3. In most cases, it's not required to map fields for either the Contact or Company objects. If your specific implementation requires mappings from either of these, a custom set of mappings will be provided to you by your impact.com-assigned Implementation Engineer.

impact.com Mapping
HubSpot Mapping
Required?

EventDate

lastmodifieddate

Yes

CustomerId

hs_object_id

Yes

CustomerEmail

email

No

OrderId This is the default field used by impact.com to uniquely identify each conversion event. However, you can select another field to use instead.

deal_[stage]_id

Yes

EventTypeCode This is the default field used by impact.com to determine which program rule to trigger for a conversion event. However, you can select another field to use instead.

deal_[deal stage]

Yes

OrderSubTotal

amount

Recommended

Date3

closedate

Recommended

Text2

hs_deal_stage_probability

Recommended


Configure HubSpot for Advocate

If you already have impact.com and HubSpot connected, you can reopen the connector to configure Advocate for HubSpot.

2

Review your Microsite

Use microsites to give your customer advocates an easy way to interact with your Advocate program and start sharing.

You’ll need to:

  1. Share the microsite URL with your Advocates when you launch the program.

3

Set up your cash rewards

Your customer advocate can be rewarded with cash payouts. Confirm that your impact.com account is adequately funded.

4

Test the integration

We recommend testing the integration to ensure it’s working as intended.

Test
Purpose

Create a deal with one of the new HubSpot contacts and change its status to Closed Won. Use if you set up your program rules to perform an action when a deal’s status changes. If you used another status other than Closed Won, test with that.

Confirm that program rules trigger correctly when a deal’s status changes. This should create and convert the referral.

Congratulations! You’ve successfully navigated the technical setup. Your Advocate program is now integrated with HubSpot. To start seeing results and getting your Advocates engaged, make sure to share your unique microsite link across your marketing channels.

Optional enhancements

Upgrade your integration

For users already utilizing the HubSpot integration for Performance and Creator programs, these Advocate-specific configurations are optional. You don’t need to make any immediate changes to your existing integration to launch your Advocate program; however, we recommend revisiting these enhancements once you’ve completed the initial setup steps above to ensure your integration is fully optimized.

Key benefits of activating the Advocate-specific integration include:

  • Bi-directional data syncing: After setup, HubSpot can send referral tracking, deal stage, and contact information directly to impact.com. Important Advocate program properties like referral codes, share links, and more will be visible on contact records.

  • Lead and Contact enrichment: Set up a HubSpot lead capture form that sends referral data to your Advocate program.


Manage your data sharing rules

This step takes place within the HubSpot to impact.com connector.

  1. Choose which data is shared between impact.com and HubSpot when a new contact or participant is created.

Action
When

Create contacts in HubSpot

An Advocate participant is created. An existing, unmapped participant is updated.

Create Advocate participants in impact.com

A HubSpot contact is created. An existing, unmapped contact is updated.

  1. Refer to HubSpot's documentation to learn how to customize the properties shown on records.

  2. There are other, non-adjustable rules for deleting and updating participant and contact records. You can return to this screen to review them, or refer to HubSpot & Advocate Data Mapping Explained for more details.

  3. Update the contact record layout in HubSpot to show participants' Advocate data.

  4. Review your selections and choose whether to sync all Advocate participant data to HubSpot after setup.

  5. Select Finish.


Register Referred Leads

  1. Create a new hidden field on your HubSpot form for the impact_referredby_code Contact Property.

  2. Load the function below alongside your HubSpot lead form.

    • This function will break down the referral cookie and ensure the referred by code is submitted along with the rest of the customer’s information to HubSpot.

  3. Replace ProgramID with your Advocate Program ID.

<script>
  document.addEventListener("DOMContentLoaded", function() {
    // Delay function to ensure HubSpot form fields are fully rendered
    setTimeout(function () {
      window.impactOnReady = function () {
        // Retrieve the DOM element you want to auto-fill the referral code into
        const elements = document.getElementsByName("impact_referredby_code");
        if (elements.length > 0) {
          const element = elements[0];
          // Retrieve referral information from the cookie and set on element
          impact.api().referralCookie()
            .then(function (response) {
              const referralCode = response.codes['PROGRAMID'];
              if (referralCode) {
                element.value = referralCode;
              }
            })
            .catch(function (error) {
              console.error("Error retrieving referral cookie:", error);
            });
        } else {
          console.error("No element found with name 'impact_referredby_code'");
        }
      }
      // Call the impactOnReady function
      if (typeof impact !== 'undefined') {
        window.impactOnReady();
      } else {
        console.error("Impact object not found.");
      }
    }, 1000) // 1-second delay to ensure HubSpot form fields are rendered
  });
</script>

Sync HubSpot data

Optionally, you can bulk import data into HubSpot to ensure your Advocate program’s participants are synced with your HubSpot leads and contacts.

  1. Export your contacts from HubSpot as a .CSV file.

  2. Adjust the .CSV file to match the accepted bulk import format.

    1. Make sure that the name of the email column in the import file is email. We use this field to map HubSpot contacts with Advocate participants.

  3. In your impact.com account, from the left navigation menu, select Participants.

  4. At the top-right corner of the page, select Import users.

  5. Upload the .CSV file.

    • To avoid errors, check that the .CSV file you’ve prepared follows the accepted import format. Reach out to our support team if you have questions.

What’s Next

Finally, test your integration to make sure that participants are being correctly registered in impact.com and rewarded for successful referrals.

Last updated