Skip to main content
Optimizely → HubSpotIntegration guide

Connecting Optimizely to HubSpot

Optimizely deliberately shows different people different experiences, which means every conversion figure your ad platform reports is an average across variants it knows nothing about. HubSpot is where sales works, so a conversion that never reaches it is invisible to the people who decide what a lead was worth. The join between them succeeds or fails on one thing: whether the contact identity — email, or the hubspotutk cookie reaches the Optimizely variant assignment before the conversion happens, because HubSpot can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Optimizely variants on HubSpot contacts, so deals read per test

Write the Optimizely experiment and variant to a HubSpot contact property at conversion, only if empty, and copy it onto the deal, so pipeline can be read per test. Use one property per experiment, pass the variant as a hidden form field if no integration fits, and avoid running HubSpot's own page tests on the same page.

HubSpot is where an Optimizely test on a B2B funnel gets its real verdict. A variant that lifts form fills by attracting weaker leads looks like a win in Optimizely and a loss three months later in the pipeline. To see that, the variant has to live on the HubSpot contact: write the experiment and variant to a contact property when the person converts, and copy it onto the deal when the deal is created.

Set that property only if it is empty. A contact who returns during a later experiment must not have their first variant overwritten, or the deal that closes in Q3 is credited to whatever test was running when they last visited. For several concurrent tests, use one property per experiment rather than a single field. Check Optimizely's integrations list for a HubSpot connection before building; if none fits, pass the variant as a hidden form field.

Watch for two experimentation tools on one page. HubSpot can run its own A/B tests and smart content on HubSpot-hosted landing pages, and an Optimizely experiment on the same page splits traffic twice. Your deal reports then mix two sets of variants, and neither tool knows about the other. Pick one tool per page.

Optimizely → HubSpot · what breaks

Why this join usually fails — Optimizely → HubSpot

  1. 01

    The contact identity — email, or the hubspotutk cookie never reaches Optimizely

    Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.

  2. 02

    An experiment silently confounding every campaign result

    A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.

  3. 03

    Duplicate contacts

    Two records for one person, each with half the history. Every downstream report is then wrong in a way that looks like a data problem rather than an integration problem.

  4. 04

    Nothing reconciles afterwards

    HubSpot shows the contact record and its timeline. A successful API response means HubSpot accepted the call, not that it resolved to the right contact — open the record and look.

Optimizely → HubSpot · the fix

What working looks like — Optimizely → HubSpot

  • The contact identity — email, or the hubspotutk cookie on every assignment

  • Conversions arriving in HubSpot

    The revenue or conversion lands on the contact record and its associated deal, where sales can see it and where HubSpot's own attribution reporting can use it.

  • Reconciled against the source

Optimizely → HubSpot · architecture

How Optimizely and HubSpot actually connect

  1. 1

    Optimizely holds the truth

    The variant is the missing dimension. Without it, a campaign's performance is confounded by an experiment nobody told the media team about, and both teams will draw confident, wrong conclusions.

  2. 2

    HubSpot needs a click to match

    HubSpot needs to resolve the incoming data to an existing contact or create one. Without an email or a hubspotutk it creates duplicates, and duplicate contacts break every report built on top of them.

  3. 3

    The identifier is the bridge

    The contact identity — email, or the hubspotutk cookie, captured at the visit and carried into the Optimizely variant assignment.

  4. 4

    The event source decides reliability

    Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.

  5. 5

    Deduplication at the destination

    HubSpot deduplicates contacts on email address. Events and property updates against the same contact are idempotent by design, but a second contact created for the same person is not detected, and merging them afterwards is manual work.

Optimizely → HubSpot · normal or broken

Working vs. broken, side by side — Optimizely → HubSpot

Normal, not a fault

  • The contact identity — email, or the hubspotutk cookie present on the assignment

  • Sent from your order system with variant attached

  • Deduplicated correctly

    HubSpot deduplicates contacts on email address. Events and property updates against the same contact are idempotent by design, but a second contact created for the same person is not detected, and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The contact identity — email, or the hubspotutk cookie missing on most records

    Client-side experiments can flicker and can delay rendering, which loses landing-page identifier capture on slow connections — a bias that falls unevenly across variants.

  • Sent from the browser

    A test that moves conversion rate by fifteen percent will move every campaign's measured performance by some fraction of that, and the media team will attribute it to bidding, creative or seasonality. Anything but the test.

  • Counted twice, or not at all

    Two records for one person, each with half the history. Every downstream report is then wrong in a way that looks like a data problem rather than an integration problem.

  • Nobody has reconciled it

Optimizely → HubSpot · diagnose

Diagnostic order — Optimizely → HubSpot

  1. 01

    Count assignments carrying the contact identity — email, or the hubspotutk cookie

  2. 02

    Follow one real conversion end to end

  3. 03

    Check for running experiments before diagnosing a performance change

    First question, not last. It costs one minute and explains a surprising share of unexplained movements.

  4. 04

    Search for the test contact by email after sending

    One record or two? Then check whether the properties landed on the contact or only on the form submission — they are different things and only the first is usable.

  5. 05

    Read the match rate, not the success message

    HubSpot shows the contact record and its timeline. A successful API response means HubSpot accepted the call, not that it resolved to the right contact — open the record and look.

Optimizely → HubSpot · prove

How it gets proven — Optimizely → HubSpot

Source of truth

Your order system, joined to the variant each customer was assigned.

  • The contact identity — email, or the hubspotutk cookie confirmed present on a live assignment.
  • One contact record confirmed, not two, with the property visible on the contact rather than only on the submission.
  • Orders reconciled per variant against imported conversions over the full experiment window.

Optimizely → HubSpot · free audit

What we check in the free audit

  • Count assignments carrying the contact identity — email, or the hubspotutk cookie
  • Follow one real conversion end to end
  • Check for running experiments before diagnosing a performance change
  • Search for the test contact by email after sending
  • Read the match rate, not the success message

Checked against

Your order system, joined to the variant each customer was assigned.

Get my free conversion tracking audit

Free30 minutesNo obligation

Optimizely → HubSpot · when not to buy

When you don't need this — Optimizely → HubSpot

  • Measure identifier coverage yourself first — pull your last hundred assignments and count how many carry the contact identity — email, or the hubspotutk cookie.
  • If you are not running experiments on pages in the paid funnel, there is no confound and nothing to integrate.
  • HubSpot's native form and tracking code already handle the straightforward cases well. This is worth building when the conversion happens somewhere HubSpot's code cannot see.

Optimizely → HubSpot · what we deliver

What gets built — Optimizely → HubSpot

  • Identifier capture into Optimizely

    Capture the identifier before the experiment framework initializes, and pass the variant assignment as a dimension alongside it.

  • Event source: your order system with variant attached

    Send purchases with the variant as a custom dimension, so campaign performance can be read per variant rather than blended.

  • Dispatch to HubSpot

    The HubSpot API — contact create-or-update with the properties, or a custom behavioral event where you need the timeline entry rather than a property.

  • Reversals where they exist

    Refunds reverse and should retain the variant dimension.

Written guarantee

95%+ tracking accuracy

Measured against Your order system, joined to the variant each customer was assigned.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Optimizely → HubSpot questions, answered

Store the experiment and variant on the HubSpot contact at conversion, copy it to the deal, and report closed-won amount by that property. Read it after your sales cycle has had time to close, not when the test ends.

Free · 30 min

Get Optimizely and HubSpot joined properly

Free30 minutesNo obligation