Connecting Optimizely to Salesforce
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. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Optimizely variant assignment before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Optimizely variants on Salesforce Leads: judge pipeline, not forms
Write the Optimizely experiment and variation IDs into custom Lead fields at creation, via a hidden form input filled after bucketing, beside the gclid or fbclid, and map them through Lead conversion to the Opportunity. Report Opportunities by variant and campaign, keep the fields after the test, and judge on closed-won after a full sales cycle.
On a lead-gen site, an Optimizely test usually measures form submissions, and Salesforce is where you learn whether the extra submissions were worth anything. A shorter form can win on submits and lose on qualified pipeline. Write the experiment and variation IDs into custom fields on the Lead at creation, next to the gclid or fbclid you already capture, and map those fields through Lead conversion to the Opportunity.
Populate a hidden form input from Optimizely's client-side state after bucketing, and check it is filled in both variants; a variant that re-renders the form can drop the hidden input without anyone noticing. A single field holding experiment-and-variation pairs scales better than a field per test, though it is harder to report on, so pick deliberately. A report of Opportunities by variant and by campaign then shows whether a variant changed lead quality for paid traffic specifically.
Timing decides when you can read it. Opportunities close weeks after the test ends, so keep the variant fields after the experiment is stopped, and judge the result on closed-won only once a full sales cycle has passed. If you upload Opportunity stages to Google or Meta as offline conversions, a test that shifted lead quality will also shift what those platforms learn from.
Optimizely → Salesforce · what breaks
Why this join usually fails — Optimizely → Salesforce
- 01
The Lead or Contact identity 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.
- 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.
- 03
Writes that succeed and change nothing
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
- 04
Nothing reconciles afterwards
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Optimizely → Salesforce · the fix
What working looks like — Optimizely → Salesforce
The Lead or Contact identity on every assignment
Conversions arriving in Salesforce
The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.
Reconciled against the source
Optimizely → Salesforce · architecture
How Optimizely and Salesforce actually connect
- 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
Salesforce needs a click to match
Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.
- 3
The identifier is the bridge
The Lead or Contact identity, captured at the visit and carried into the Optimizely variant assignment.
- 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
Deduplication at the destination
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Optimizely → Salesforce · normal or broken
Working vs. broken, side by side — Optimizely → Salesforce
Normal, not a fault
The Lead or Contact identity present on the assignment
Sent from your order system with variant attached
Deduplicated correctly
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Reconciles with the source
Actually broken
The Lead or Contact identity 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
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
Nobody has reconciled it
Optimizely → Salesforce · diagnose
Diagnostic order — Optimizely → Salesforce
- 01
Count assignments carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 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.
- 04
Write a test value and open the record in the UI
The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.
- 05
Read the match rate, not the success message
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
Optimizely → Salesforce · prove
How it gets proven — Optimizely → Salesforce
Source of truth
Your order system, joined to the variant each customer was assigned.
- The Lead or Contact identity confirmed present on a live assignment.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Orders reconciled per variant against imported conversions over the full experiment window.
Optimizely → Salesforce · free audit
What we check in the free audit
- Count assignments carrying the Lead or Contact identity
- Follow one real conversion end to end
- Check for running experiments before diagnosing a performance change
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Your order system, joined to the variant each customer was assigned.
Free30 minutesNo obligation
Optimizely → Salesforce · when not to buy
When you don't need this — Optimizely → Salesforce
- Measure identifier coverage yourself first — pull your last hundred assignments and count how many carry the Lead or Contact identity.
- If you are not running experiments on pages in the paid funnel, there is no confound and nothing to integrate.
- If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.
Optimizely → Salesforce · what we deliver
What gets built — Optimizely → Salesforce
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 Salesforce
API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.
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.
From $400 · See packages
FAQ
Optimizely → Salesforce questions, answered
Write the experiment and variation IDs into a hidden form field and onto custom Lead fields, then map them through Lead conversion so they reach the Opportunity.
At least one typical sales cycle after the test ends, so most Opportunities from both variants have closed or been lost.
Almost always because the Lead or Contact identity never reached the Optimizely variant assignment. 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. Measure coverage before debugging the dispatch.
Salesforce resolves on its own record identity — a Lead, a Contact, or an Account — rather than on a click identifier. What you are doing here is attaching marketing context to a record so the pipeline carries it, which means the click identifier arrives as a custom field value rather than as a matching key. The hazard is duplicates: two Leads for one person means two records with half the history each.
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.
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
More on Optimizely → Salesforce
- Optimizely → Marketing CloudConnecting Optimizely to Salesforce Marketing Cloud
- Salesforce → Google AdsConnecting Salesforce to Google Ads
- Salesforce → MetaConnecting Salesforce to Meta Conversions API
RELATED GUIDES
Where Optimizely → Salesforce fits in the rest of your tracking
- VWO → SalesforceConnecting VWO to Salesforce
- RudderStack → SalesforceConnecting RudderStack to Salesforce
- Dynamic Yield → SalesforceConnecting Dynamic Yield to Salesforce
- Optimizely → 6senseConnecting Optimizely to 6sense
- Optimizely → MarketoConnecting Optimizely to Marketo
- B2BConversion tracking for B2B, from first touch to closed-won
- Tealium → SalesforceConnecting Tealium to Salesforce
- mParticle → SalesforceConnecting mParticle to Salesforce
Free · 30 min
Get Optimizely and Salesforce joined properly
Free30 minutesNo obligation
