Skip to content

Instantly share code, notes, and snippets.

@philpoore
Created May 26, 2020 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philpoore/45ba87e8e159ec57fdb65bb93f969790 to your computer and use it in GitHub Desktop.
Save philpoore/45ba87e8e159ec57fdb65bb93f969790 to your computer and use it in GitHub Desktop.
VWO to Adobe Javascript Integration Snippet
var _vis_opt_queue = window._vis_opt_queue || [],
_vis_counter = 0, adobeVar = 'eVar63';
_vis_opt_queue.push(function() {
try {
if (_vis_counter) {
return;
}
var _vis_combination;
s[adobeVar] = '';
_vwo_exp_ids.filter(function (_vis_id) {
return _vwo_exp[_vis_id].ready
}).map(function (_vis_id) {
_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") {
var group = _vwo_exp[_vis_id].comb_n[_vis_combination]
s[adobeVar] += (s[adobeVar] !== '' ? '|' : '') + _vis_id + ":" + group;
_vis_counter++;
}
});
} catch (err) {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment