Visual Website Optimizer Integration
How to implement the Visual Website Optimizer JavaScript
- Log into the Infinity Portal
- Navigate to the Admin Section
- Select Tracking Settings
- Select JavaScript Config
- Select Visual Website Optimizer
- Your Visual Website Optimizer JavaScript will be added to the existing code, see below example:
<!-- VWO Infinity Callback -->
<script type="text/javascript">
var _ictVwoIntegration = function (exp_ids) {
var _vis_opt_queue = window._vis_opt_queue || [];
var _expIds = [], _combIds = [];
_vis_opt_queue.push(function () {
if (_expIds.length === 0) {
var _vis_combination, _vis_id;
// Loop through experiment IDs and pick out the combination ID from ones that are active
for (var i = 0; i < exp_ids.length; i++) {
_vis_id = exp_ids[i];
if (typeof _vwo_exp[_vis_id] !== 'undefined' && _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;
_expIds.push(_vis_id);
_combIds.push(_vis_combination);
}
}
}
if (_expIds.length > 0) {
_ictt.push([ '_setCustomVar', [ 'vwocomb', _combIds.join(',') ] ]);
_ictt.push([ '_setCustomVar', [ 'vwoexp', _expIds.join(',') ] ]);
}
}
});
}
</script>
<!-- VWO Infinity Callback -->
<!-- Infinity Tracking Code v2.0
Copyright Infinity 2020
www.infinity.co -->
<script type="text/javascript">
var _ictt = _ictt || [];
_ictt.push(['_setIgrp','1086']); // Installation ID
_ictt.push(['_enableGAIntegration',{'gua':true,'ga':false}]);
_ictt.push(['_includeExternal',[{'from':'_vwo_exp_ids','to':'_ictVwoIntegration'}]]);
_ictt.push(['_enableAutoDiscovery']);
_ictt.push(['_track']);
(function() {
var ict = document.createElement('script'); ict.type = 'text/javascript'; ict.async = true;
ict.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'ict.infinity-tracking.net/js/nas.v1.min.js';
var scr = document.getElementsByTagName('script')[0]; scr.parentNode.insertBefore(ict, scr);
})();
</script>
<!-- Infinity Tracking Code End -->
Please add the additional JavaScript to your existing JavaScript on your website
Add Integration
- Navigate to Admin section of the Portal
- Select Integrations
- Click Add Integration
- Select Visual Website Optimizer
- What do you want to send? (Click Add if you would like to add any additional criteria)
- Finally, click Save to complete your integration
- The integration will pass details of all the active experiment and variant data that the visitor is participating in