Hubspot
Natalya Yefimenko avatar
Written by Natalya Yefimenko
Updated over a week ago

HubSpot is a CRM platform with all the tools for marketing, sales, customer service, and content management. It is possible to integrate Reach with HubSpot, so that you could track conversions that happen with leads in HubSpot and pay publishers for them.

Before you begin

Tracking flow

Integration with HubSpot is performed with the help of the Reach pixel code.

  1. The end-user clicks on your publisher's link on his source. Reach records the click related to the publisher and performs the redirect.

  2. The end-user is redirected to your landing page. Reach JavaScript pixel code records the click_id in the cookies as rchclick.

  3. The end-user browses over the landing and fills in a contact form. HubSpot creates a contact. Reach JavaScript pixel automatically adds rchclick to the contact properties.

  4. The end-user proceeds over his life-cycle via some events. HubSpot sends postbacks to Reach, which contain rchclick. Reach finds a click with the matching ID and records a conversion for the relevant click.

Adding a Reach pixel code

Add the following pixel code to your landing page, where your tracking URL leads to, as well as to the webpage, where the HubSpot contact form is located:

<script src="https://clk1.reachclk.com/sdk/reach.js"></script> <script>
Reach.hsInit();
</script>

It should be added to the end of the pages' bodies and after the HubSpot form code.

Why you need a pixel code:

  • if there is a click_id parameter in the URL, it saves it to rchclick parameter of the browser cookies.

  • when HubSpot form is loaded, if there is a rchclick hidden field, the code fills in it with the value of the rchclick parameter, stored in cookies.

Setting integration on HubSpot

⚠️You need the administrator access for setting up integration on HubSpot.

Set up a property

  1. Go to the Contacts drop-down menu, the Contacts section.


  2. Go to the Actions drop-down menu, and click Edit properties.

  3. Click Create property.

  4. Fill it in the following way:

    • Object type: Contact

    • Group: UTM Tracking

    • Label: Reach Click ID

  5. Click on the </> icon. In the Internal name field, type rchclick, and click Save. Click Next.

  6. Select the Field type as Single-line text, and click Create.

Add the property to the HubSpot form

  1. Go to the Marketing drop-down menu, the Lead Capture section, Forms.

  2. Select the form, which you want to add Reach to, and click Edit.

  3. Let’s suppose that the existing form initially collects only emails. Search for the Reach Click ID and click the property.

  4. Make sure that the field was added to the form. Select Make this field hidden, check the Hidden Field label on it and click Update.

  5. Click Publish. If the form was already implemented on a website page, you don't need to proceed with any additional actions.

Set up a webhook in HubSpot

The next step depends on what an event (goal) which you want to track as conversions in Reach, is.

You may choose any conditions for a webhook to trigger, based on:

  • the properties (e.x. you can trigger it only for specific countries).

  • events (e.x. Lead status change).

Webhooks may be set for other entities (not only contacts) as well.


In the guide below you will see steps for this even: Contact form submitted. A Contact was created with the lead status New.

  1. Go to Workflows.


  2. Click the Create workflow drop-down menu, then click From scratch.

  3. Select Contact-based, and click Next.

  4. Click Set up triggers, and select Contact properties.

  5. In the Contact properties field, type Reach Click ID and click on it.

  6. Select the is known checkbox, and click Apply filter. The webhook will only work for the contacts that contain some value in the Reach Click ID field.

  7. For Contact form submitted event click AND.

  8. Select the Contact properties filter type.

  9. Select the Lead status property.

  10. Select is any of and New, and then click Apply filter.

  11. Click Save.

  12. Click the + icon.

  13. In the Workflow side menu, click Send a webhook. Select the Post option.

  14. You need to get a Reach postback link. It looks the following way:

    https://psb1.reachaff.com/postbacks?click_id={CLICK_ID}&advertiser_id=your_advertiser_id_in_Reach
    1. Apply the following changes to the link:

      • remove click_id={CLICK_ID}&

      • add /hubspot after postbacks

    2. Add the goal, which you have in your campaign in Reach:

      1. Go to your campaign in Reach

      2. Go to the Goals tab

      3. Find the goal you want to track and click the side menu, then click Edit.

      4. Take the value from the Postback parameter value field.

      5. Add it to the postback URL in the goal parameter.

      So the modified link will look the following way:

      https://psb1.reachaff.com/postback/hubspot?advertiser_id=your_advertiser_id_in_Reach&goal=lead

  15. Take the link and enter it to the Webhook URL field on HubSpot.

  16. Select Choose specific properties, and fill in the fields in the following way:

    • Reach Click ID: rchclick

    • Email: user_id (optional: it simplifies searching for related conversions in Reach).

  17. Click Save.

  18. Click Review and publish.

  19. Select No, only enroll contacts who meet the trigger criteria after turning the workflow on, and click Turn on.

    Perform the integration test

To make sure whether the integration is set up correctly, we highly recommend running the integration text. It is basically the test of the PIxel integration, so in this guide, you will see the example of the test specifically for HubSpot.

  1. Create a click.

    1. Go to your campaign, to the Tracking settings tab.

    2. Copy your Example tracking link, and fire it in the address bar. ⚠️Take targeting restrictions into account.

    3. Go to the Clicks statistics and check, whether the click was recorded.

  2. Check whether the value of the click_id parameter from your tracking URL was recorded to rchclick in the browser cookies.

    1. Right-click on your webpage, and click Inspect.

    2. On the top tab click Application, and in the side menu click Cookies.

  3. Create a conversion.

    1. Proceed to the HubSpot form and submit it.

  4. Check the contact properties on HubSpot.

    1. Go to the Contacts drop-down menu, the Contacts section, and click on the created contact.

    2. Click View all properties.

    3. Check the value of the Reach Click ID property.

  5. Check workflow enrollments.

    1. Go to the workflow, which you created. Click the More drop-down menu, and click View enrollments.

    2. Check whether the contact, which you created, proceeded with this workflow.

  6. Check the conversion on Reach.

    1. Go to the Postback log and check the record.

    2. Go to the Conversions statistics and check the very conversion. Click on it to see details. Check the user_id in the conversion.


      Please contact Affise Customer Support team regarding all raised questions via the e-mail: [email protected].

Did this answer your question?