RELEVANT PRODUCTS:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization
  • Optimizely X Web Recommendations

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

  • Seen a specific experience of your Optimizely Personalization campaign

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

 
Tip:

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 some customers use it to integrate Optimizely experiments through DTM.

If you're familiar with the Optimizely Classic integration with Adobe Analytics, we've changed a few things. Here's what you need to know:

  • You no longer need to add the API callactivateSiteCatalystbut it's fine to leave it in your code. In fact, it's a good idea if you're still using Optimizely Classic.

  • Optimizely X no longer sends Optimizely data with the 'pageview.' Instead, it's sent as a separate non-interaction 'event' that is independent of the 'pageview.'

1. Enable in Optimizely

  1. Enable the integration for your Optimizely X project, if you haven't already.

  2. Navigate to an individual experiment or Personalization campaign that you'd like to track in Adobe Analytics.

  3. Under Manage Campaign, click Integrations.

  4. Fill out the Adobe Analytics integration form by specifying a Conversion Variable and Traffic Variable.



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

    The sVariable is optional. 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}]);
    
    

Custom "one eVar" Integration is available here, but we do not officially support it: https://optimizely.atlassian.net/wik...pageId=2719795

2. Check the custom report for your Optimizely experiment

Once you've enabled the integration, you can check the custom Adobe Analytics report for your experiment to make sure that it's working as expected.

When you log in to your Adobe Analytics account, you should see a dashboard that looks something like this (the example below shows SiteCatalyst 15):

  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.

If you're using Optimizely X Web Experimentation, filter the report for the words "experiment" and "treatment" to see only the data that was included in your Optimizely experiment.

Currently, Experimentation tracks events for visitors who do not enter the experiment (if your traffic allocation is set to less than 100%); these will show up in your unfiltered report.

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

The default implementation of Adobe Analytics uses this code to send a tracking call:

s.t();

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 a decision event is made, Optimizely X sends that event to Adobe Analytics as soon as possible, polling for availability of the Adobe Analytics object. If the Adobe Analytics object isn't ready when a decision is made, Optimizely checks back every 200 ms for 10 seconds to see if Optimizely can send the Adobe Analytics string. This helps with delayed activation experiments (and if they fall under delayed activation, it helps with geo-targeted experiments too).

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:

foo.t();

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

Replace: 

window.optimizely.push("activateSiteCatalyst");

With:

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

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.