This article will help you:
  • Integrate Adobe Analytics (Omniture SiteCatalyst) to read experiment data from Optimizely
  • Add Adobe Analytics integration code to your page
  • Set up custom conversion variables (eVars) and traffic variables (prop)
  • Solve common troubleshooting issues with integration

Optimizely's integration with Adobe Analytics (formerly Omniture SiteCatalyst) lets you view the analytics details for visitors who've seen a specific variation of your Optimizely experiment.

This article walks you through how to set up this integration, both in Optimizely and Adobe Analytics.


Using Adobe Tag Manager? Some customers have provided a third-party solution for completing this integration using Dynamic Tag Management DTM. This isn't a supported use case, but may help users integrate their experiments through DTM.


Ready to get started? First, you'll need to enable Adobe Analytics.

  1. Navigate to the project's Home page and select the Integrations tab.

  2. Select Adobe Analytics and toggle it On.

Later, you'll enable Adobe Analytics for a specific experiment.

Here are a few more details to keep in mind as you get started with this integration:

In Adobe Analytics, eVar and prop variables pass information along with a tracking call to specify additional information about the visitor. For each experiment, the integration uses a unique eVar or prop variable to pass along the experiment name and variation name that the visitor is currently bucketed into (if any).

For example, the eVar/prop variable might contain a value like this:

“Optimizely_HomepageTest: Variation1”

The integration lets you leverage all your existing reports in Adobe Analytics by viewing them through a custom Optimizely segment and seeing how users grouped into certain variations behave.

Your Optimizely experiment must be running for Adobe Analytics integration to work. 

1. Set up Adobe Analytics integration

Optimizely uses Adobe Analytics custom commerce variables to tag your visitors with the experiments and variations to which they've been added. Here's how to configure Optimizely to begin sending this information to Adobe Analytics:

  1. Add this JavaScript code to your Adobe Analytics s_code.js file (or directly on your page after the s_code.js loads and before the Adobe Analytics tracking call is made):

     // Optimizely Adobe Analytics SiteCatalyst Integration
     window.optimizely = window.optimizely || [];

    The placement and timing of this code must be after the bulk of your Adobe Analytics code is defined, but before any Adobe Analytics tracking call. Optimizely needs to know when there’s a tracker object to append information to. But, it can't be so late that the tracking call is sent and there's nothing to append to.

  2. Then, enable the integration in Optimizely.

    In the Visual Editor, in your experiment, click Options > Integrations and select the Adobe Analytics checkbox.

  3. Under Conversion Variable, select the eVar you want Optimizely to use. The eVar should not be in use by another part of your site or a concurrently running Optimizely experiment.

Where should the code live?

We recommend adding this code to your s_code.js file in the plugin section. However, if your Adobe Analytics tracking call is made outside of your s_code.js file and you don't want to add the integration code directly to your s_code.js file, you could use this setup:

    <script src="//"></script> 
    <script type="text/javascript" src="/js/omniture/s_code.js"></script> 
      // Optimizely Adobe Analytics SiteCatalyst Integration code
      window.optimizely = window.optimizely || []; 
      // Omniture tracking call made


Specify a custom sVariable 

Some sites use custom Adobe Analytics implementations with special sVariable names. The sVariable contains all of the tracking tags to be sent to Adobe Analytics for a given visitor.

If you want to specify a custom sVariable, you can add a parameter to the Optimizely API call. If the parameter is omitted, Optimizely will use s by default. Leave "sVariable" as is, and specify your custom object as a variable, not a string; don't add quotes when replacing my_custom_s_var.

Here's an example:

// Optimizely Adobe Analytics SiteCatalyst Integration
window.optimizely = window.optimizely || [];
window.optimizely.push(['activateSiteCatalyst', {"sVariable": my_custom_s_var}]);

2. Check the custom report for your Optimizely experiment

Now that you've enabled the integration, you probably want to make sure everything's working as expected. Let's check the custom Adobe Analytics report for your experiment.

When you log in to your Adobe Analytics account, you should see a dashboard that looks like this:

This example shows SiteCatalyst 15. If you use a different version, you'll see something different.

  1. To get to the Optimizely custom variable, click Custom Conversion > Custom Conversion XX-XX > Optimizely (vXX).

    The XX represents the eVar you selected when you enabled the Optimizely integration.

  2. Click the Optimizely custom conversion to go to the custom report.

  3. To check how specific custom events performed across variations, click Add Metrics.

  1. Drag the custom event you want to display from the Available Metrics list to the Report Data Columns Canvas list to add it to the report.

  2. When you're finished adding events to the report, click OK. You should see a modified report that shows the conversion data for the custom event.

 To drill down the report by other parameters, click Broken Down by: None.

3. Set up a custom conversion variable

With custom conversion variables ("eVars") in Adobe Analytics, you can capture conversion events or other attributes specific to your webpage. Just like custom variables in Google Analytics, you can use custom conversion variables to segment your reports for fine-grained analysis. When combined with integration in Optimizely, eVars let you segment your reports by your experiments and identify the best-performing variation.

To reserve an eVar for your Optimizely experiment:

  1. Navigate to Report Suite Manager in Adobe Analytics.

  2. Click Edit Settings > Conversions > Conversion Variables.

  3. Click Add New eVar.

After adding your new eVar, you'll need to choose a unique name, allocation type, cookie expiration, data type, and relation status. Not sure which values to choose? Here are the default values we recommend:

  • Allocation: Most Recent (Last)

  • Expire After: Visit

  • Type: Text String

  • Status: Basic Subrelations

Allocation is used to determine which eVar value should be associated with a given visitor. If the visitor happens to trigger multiple events, you might want to attribute this to the last value they were assigned so that the revenue and participation metrics are attributed to this last value. Choosing "Linear" allocation divides the revenue and success goals evenly over all events. If you want to view your success events across multiple eVar values, you can do that with participation.

Check out this article for more about how allocation differs from participation and to learn how to set up participation.

Preserving referral sources during redirects

When a redirect takes place in Optimizely with the Adobe Analytics integration enabled, we grab the document.referrer value and set the s.referrer variable to maintain the original referrer. This works well on landing pages, but if there is a redirect on any page deeper into your website, it strips the visitor's original session referrer and makes the referrer the immediately preceding page. This inflates your direct and referral traffic source data in Adobe reports.

To address this issue, implement this GitHub code to run on every page load above the Optimizely snippet. On the initial landing page, this code will grab the session's initial referrer and set it to a cookie. The cookie persists through the visitor's navigation on your website. When the visitor is redirected on a non-landing page as part of an Optimizely experiment, this code will determine if the existing session's referrer should be preserved or updated to document.referrer. Then, the code sends the appropriate referrer to Adobe Analytics. As a result, the original traffic source is persistent.

Please make sure to read the implementation instructions at the top of the code.

Troubleshoot your integration

Integrating Optimizely with Adobe Analytics takes a little more legwork with an extra line of JavaScript, but it’s usually straightforward.

If you’re having trouble with Optimizely's Adobe Analytics integration, here are a few things to investigate that may help resolve the issue.

Tools to help verify things are working correctly

Here are some tools to help debug a Adobe Analytics integration:

  • Chrome Browser extension that detects when a tracking call has been made and what values have been sent along with it

  • An Adobe DigitalPulse Debugger that uses a JavaScript bookmarklet to pop-up information about the Adobe Analytics implementation on a page when run

Identify the Adobe Analytics tracking call

As we mentioned, if you're using Optimizely classic, placement of the Optimizely snippet is critical. The default implementation of Adobe Analytics uses this code to send a tracking call:


It’s a small bit of code, but this function call sends out all of the Adobe Analytics tracking information for the pageview. By default, Optimizely assumes this will be s,  but this tracking call may have a different leading variable that isn'ts if you’re using a custom tracker name. If you can’t find a s.t(); call on your page, search for anything resembling .t() in case another call exists with a different leading variable name before the period.

When you find this tracking call, make sure to place the Optimizely snippet before it and confirm that the tracking call will execute after Optimizely’s integration code.

Confirm the correct order for integration code

It's also important that the Optimizely classic integration code is in the correct order. Here's the order to confirm:

  1. The Optimizely snippet and Adobe Analytics setup code.

  • Adobe Analytics setup code is usually in a file called s_code.js, but the filename may change depending on your implementation.

  • It doesn't matter whether the Optimizely snippet or the Adobe Analytics setup code is first.

  1. The Optimizely integration code.

  2. The tracking call s.t();.

Optimizely does not append anything to the Adobe Analytics tracker until the API call is made:


So when the API call is made, the Adobe Analytics variable must exist. The tracking call must come last so that Optimizely information gets passed along with your existing tracking data.

If you want to keep everything within the s_code.js file, there is usually a doPlugIns() function in the file where you could add the Optimizely integration code.

Identify a Custom Tracker (sVariable)

This step is optional if you’re using a default Adobe Analytics implementation. But if you notice a different variable name other than s before the period for the .t() tracking call, that will be the name of your custom sVariable. For example:


The custom s variable name in this example is foo, so you'll need to modify your Optimizely Integration code.




window.optimizely.push(["activateSiteCatalyst", {"sVariable": foo}]);

Reference your custom variable as a variable, not a string.

  • Correct: window.optimizely.push(['activateSiteCatalyst', {"sVariable": my_custom_s_var}]);
  • Incorrect: window.optimizely.push(['activateSiteCatalyst', {"sVariable": "my_custom_s_var"}]);

In the incorrect example, note the quotes around my_custom_s_var, which indicate a string. 

Here is an example of an integration that's working for a custom tracker named omntag:

Here is an example of the s object omntag when Optimizely populates eVar1 correctly:

Access to eVar/prop variables 50 through 100

Some older versions of Adobe Analytics do not work with all 100 eVar and prop variables that are available for assignment within Optimizely.

Access to variable slots 51 through 75 was added in Adobe Analytics Code Version H22 (pre-SiteCatalyst 15). You can find your Adobe Analytics Code Version number with the DigitalPulse Debugger tool. If you have an older version, limit your eVar and prop variables to 1 through 50 within Optimizely.

Access to variable slots 76 through 100 was added later, but if you’re having trouble populating them, try an eVar or prop in the range of 1 to 50 to see if that helps.