Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions integrations/visual-website-optimizer/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var VWO = (module.exports = integration('Visual Website Optimizer')
.option('listen', false)
.option('experimentNonInteraction', false)
.option('isSpa', false)
.option('trackOnlyABExperiments', false));
.option('trackOnlyAbExperiments', false));

/**
* The context for this integration.
Expand Down Expand Up @@ -135,7 +135,7 @@ VWO.prototype.roots = function() {
context: { integration: integrationContext }
});
});
}, this.options.trackOnlyABExperiments);
}, this.options.trackOnlyAbExperiments);
};

/**
Expand All @@ -147,13 +147,13 @@ VWO.prototype.roots = function() {
* @return {Object}
*/

function rootExperiments(fn, trackOnlyABExperiments) {
function rootExperiments(fn, trackOnlyAbExperiments) {
enqueue(function() {
var data = {};
var experimentIds = window._vwo_exp_ids;
if (!experimentIds) return fn();
each(experimentIds, function(experimentId) {
var variationName = variation(experimentId, trackOnlyABExperiments);
var variationName = variation(experimentId, trackOnlyAbExperiments);
if (variationName) data[experimentId] = variationName;
});
fn(null, data);
Expand Down Expand Up @@ -215,7 +215,7 @@ function isValidExperimentType(experiment) {
* @return {String}
*/

function variation(id, trackOnlyABExperiments) {
function variation(id, trackOnlyAbExperiments) {
var experiments = window._vwo_exp;
if (!experiments) return null;
var experiment = experiments[id];
Expand All @@ -227,8 +227,8 @@ function variation(id, trackOnlyABExperiments) {
}

if (
trackOnlyABExperiments &&
!isValidExperimentType(experiment, trackOnlyABExperiments)
trackOnlyAbExperiments &&
!isValidExperimentType(experiment, trackOnlyAbExperiments)
) {
return null;
}
Expand Down
6 changes: 3 additions & 3 deletions integrations/visual-website-optimizer/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ describe('Visual Website Optimizer', function() {
});
});

it('should not send experiments if experiment type is not of type A/B with trackOnlyABExperiments enabled', function(done) {
it('should not send experiments if experiment type is not of type A/B with trackOnlyAbExperiments enabled', function(done) {
vwo.options.listen = true;
vwo.options.trackOnlyABExperiments = true;
vwo.options.trackOnlyAbExperiments = true;
window._vwo_exp[1].type = 'testType';
analytics.initialize();
analytics.page();
Expand Down Expand Up @@ -292,7 +292,7 @@ describe('Visual Website Optimizer', function() {
});
});

it('should send experiments if experiment type is not of type A/B with trackOnlyABExperiments disabled', function(done) {
it('should send experiments if experiment type is not of type A/B with trackOnlyAbExperiments disabled', function(done) {
vwo.options.listen = true;
window._vwo_exp[1].type = 'testType';
analytics.initialize();
Expand Down