This website works best with JavaScript enabled. Learn how to enable JavaScript.

Adobe Analytics

Last updated

Integration of Adobe Analytics (formerly Omniture SiteCatalyst) with VWO will help you to import VWO campaign data into your Adobe Analytics account. 

The end-to-end process of integrating Adobe Analytics with VWO involves the following steps:

  1. Designating a Custom Conversion Variable
  2. Adding a Code Snippet

Designating a Custom Conversion Variable

Sign in to your Adobe Analytics account and designate a Custom Conversion variable as your optimization tracking variable.

Adding a Code Snippet

Adobe Analytics is compatible with both synchronous and asynchronous types of code. However, Make sure the VWO Smart Code snippet is added before s_code.js on your page.

  • Integrating using VWO Synchronous code
  • Integrating using Asynchronous VWO code

Integrating Using VWO Synchronous Code

Using Synchronous code, you can push data from multiple VWO campaigns to different custom variables. You need to designate one of your Custom Conversion variables as your optimization tracking variable and copy-paste following code in doPlugins section of your s_code.js file. (Also make sure VWO code snippet is located before s_code.js on your page). Use the following code snippet to push data from multiple VWO campaigns to different custom variables (eVar).

var _vis_opt_queue = window._vis_opt_queue || [], _vis_counter = 0;
_vis_opt_queue.push(function() {
try {
if(!_vis_counter) {
var _vis_data = {},_vis_combination,_vis_id,_vis_l=0;
for(;_vis_l<_vwo_exp_ids.length;_vis_l++) {
_vis_id = _vwo_exp_ids[_vis_l]; // test id
if(_vwo_exp[_vis_id].ready) {
_vis_combination = _vis_opt_readCookie('_vis_opt_exp_'+_vis_id+'_combi');
if(typeof(_vwo_exp[_vis_id].combination_chosen) != "undefined")
_vis_combination = _vwo_exp[_vis_id].combination_chosen;
if(typeof(_vwo_exp[_vis_id].comb_n[_vis_combination]) != "undefined") {
switch (_vis_id) { //_vis_id is the test id
case 1: s.eVar55 = _vis_id + ":" + _vwo_exp[_vis_id].comb_n[_vis_combination];    break;
case 2: s.eVar56 = _vis_id + ":" + _vwo_exp[_vis_id].comb_n[_vis_combination]; break;
default: s.eVar55 = _vis_id + ":" + _vwo_exp[_vis_id].comb_n[_vis_combination]; break;
catch(err) {};

“Case 1 and Case 2 in this code represent the campaign IDs for which you want to collect data. After the code snippet executes, the data for the variation combinations corresponding to the respective campaigns starts getting updated.
ATTENTION If you have deployed Adobe Analytics using Adobe Dynamic Tag Management (DTM) and used its automatic configuration, it will allow DTM to manage the AppMeasurement code, so the “s_code.js” file won’t be created. But DTM provides the option to customize the page code, wherein you can enter Javascript calls.

Integrating Using Asynchronous VWO Code

Integrating Adobe Analytics using the Asynchronous VWO code requires extra calls to be made to the Adobe Analytics servers because it involves events to update the servers. Add the following Asynchronous code below the s_code.js file to push data from multiple campaigns into different custom variables (eVar):

<script type="text/javascript">
var vis_opt_queue = window._vis_opt_queue || [], _vis_counter = 0;
_vis_opt_queue.push(function () {
try {
if (!_vis_counter) {
var _vis_data = "", _vis_combination;
_vis_combination = _vis_opt_readCookie('_vis_opt_exp_' + _vis_opt_experiment_id + '_combi');
if (typeof (_vwo_exp[_vis_opt_experiment_id].combination_chosen) != "undefined") _vis_combination = _vwo_exp[_vis_opt_experiment_id].combination_chosen;
if (typeof (_vwo_exp[_vis_opt_experiment_id].comb_n[_vis_combination]) != "undefined") {
_vis_data = 'VWO-' + _vis_opt_experiment_id + ':' + _vis_opt_comb_name[_vis_combination];
_vis_counter = 1;
if (_vis_counter && _vis_data != "") {
var s = s_gi(window.s.account || s_account);
s.linkTrackEvents = "None";
switch (_vis_opt_experiment_id) {
case 1:
s.linkTrackVars = 'eVar55';
s.eVar55 = _vis_data;, 'o', 'VWO Tracking'); break;
case 2:
s.linkTrackVars = 'eVar56';
s.eVar56 = _vis_data;, 'o', 'VWO Tracking');break;
s.linkTrackVars = 'eVar66';
s.eVar66 = _vis_data;, 'o', 'VWO Tracking');break;
} catch (err) {};

SPA Integration

For any SPA integration with VWO, you must add the following code snippet to the website, anywhere between <head> </head> elements, but before the second code snippet. This code is common for all SPA integration and must be installed only once even if you have multiple tools to integrate. For example, you may want to integrate both Omniture and Mixpanel.

<script type="text/javascript">
/* VWO Common JS Code Starts */ !function(n,o,i){var e=function(){},t=[],v=[],c=function(n,o){o.e===n[0]&&o.c.apply(this,[n])},f=function(n,o){o.e&&o.e!==n[1]||o.v&&o.v!==n[2]||o.c.apply(this,[n])},l=o.push;o.push=function(){!function(n){for(var o=0;o<v.length;o++)c(n,v[o]);if("rH"===n[0]||"vS"===n[0])for(o=0;o<t.length;o++)f(n,t[o])}(arguments[0]),l.apply(o,[]},n.onVariationApplied=function(n,i,v){"function"==typeof n&&(v=n,n=null,i=null);var c={e:n,v:i,c:v=v||e};t.push(c);for(var l=0;l<o.length;l++)"rH"!==o[l][0]&&"vS"!==o[l][0]||f(o[l],c)},n.onEventReceive=function(n,i){var t={e:n,c:i=i||e};v.push(t);for(var f=0;f<o.length;f++)c(o[f],t)}}(window.VWO=window.VWO||[],window._vwo_evq=window._vwo_evq||[]); /* VWO Common JS Code Ends */</script>

In Addition to the code above, you must add the following additional code for Adobe Omniture. 

<script type="text/javascript">

(function () {
var WAIT_TIME = 100,
analyticsTimer = 0,
var getAccount = function () {
// Change the variable according to your page
return window.s_gi(window.s_account || window.s.account);

// All tracking variable will be contained in this array
var v = [];
v.add = function (w, o) {
v.push({w: w, o: o});

// Function to send data to Omniture backend
var sendData = function () {
var s = getAccount();
for (var i = 0; i < v.length; i++) {
s[v[i].w] = v[i].o;
v[i] = v[i].w;

s.linkTrackVars = v.join(',');, 'o', 'VWO Tracking');
v.splice(0, v.length);

//Function to wait for some analytics variables before sending data
function waitForAnalyticsVariables() {
if (window.s_gi && window.s && window.s.account) {
else if (!analyticsTimer) {
analyticsTimer = setInterval(function () {


window.VWO.push(['onVariationApplied', function (data) {
if (!data) {
var expId = data[1],
variationId = data[2];
if (expId && variationId) {
// Add the variable (eVar) name and it's value here.
// In case you have multiple campaigns and you want to send the data to different eVars, add a switch case here
v.add('eVar53', 'VWO-' + expId + ':' + _vwo_exp[expId].comb_n[variationId]);
// Only send if data is available
if (v.length) {
// We are using setTimeout so that all experiment can be sent in just one call to Omniture
dataSendingTimer = setTimeout(waitForAnalyticsVariables, WAIT_TIME);


Was this article helpful?

Thanks for your feedback!
Please email us at to tell us what you were looking for. We'll send the answer to your inbox.

Contact Us / Login