Integrate with HubSpot for Advocate

This integration supports the following standard HubSpot objects: Deals, Companies, and Contacts.

This guide explains how to integrate with HubSpot for your Advocate program.

This integration supports the following 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.

Important architectural limitation: The HubSpot integration is limited to connecting with only one Advocate Program ID per HubSpot instance. This one-to-one mapping is mandatory to ensure accurate data sync and program property visibility on contact records.

[Optional] Step 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.

    1. 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 MappingHubSpot MappingRequired?
EventDatelastmodifieddateYes
CustomerIdhs_object_idYes
CustomerEmailemailNo
OrderId
This is the default field used by impact.com to differentiate between unique conversion events. However, you can select another field to use instead.
deal_[stage]_idYes
EventTypeCode
This is the default field used by impact.com to differentiate between unique conversion events. However, you can select another field to use instead.
deal_[deal stage]Yes
OrderSubTotalamountRecommended
Date3closedateRecommended
Text2hs_deal_stage_probabilityRecommended

Configure HubSpot for Advocate

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

Important: We use this single connected Advocate program as the source of information when creating these new contact properties in HubSpot: Referral Code, Share Link, Message Links, Referred-by Code, Advocate User and Account ID, and Referral Cookie.

Step 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. Customize the appearance of your microsite.

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

Step 3: Set up your cash rewards

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

Step 4: Test the integration

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

TestPurpose
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.

    ActionWhen
    Create contacts in HubSpotAn Advocate participant is created. An existing, unmapped participant is updated.
    Create Advocate participants in impact.comA HubSpot contact is created. An existing, unmapped contact is updated.
  2. Refer to HubSpot's documentation to learn how to customize the properties shown on records.

  3. 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.

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

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

    Note: The initial data sync does not transfer your HubSpot contact records to impact.com. If you’d like to import them after setting up the integration, then make sure you sync your HubSpot data.

  6. 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.

    1. 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.

Note: This function requires the Universal Tracking Tag to be loaded for all transactions.


<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;
          // 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.

    2. Learn more about bulk imports and download a sample CSV file.

  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.

    1. 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.