Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2071/Hub-promo-abc-test #583

Merged
merged 9 commits into from Jul 20, 2020

Merge develop

  • Loading branch information
wlycdgr committed Jul 20, 2020
commit 0c3fef75e9259d4035f12da1e5abe8ea2cc78dd6
@@ -1050,68 +1050,6 @@ function onMessageHandler(request, sender, callback) {
return false;
}

/**
* Determine Antitracking configuration parameters based
* on the results returned from the abtest endpoint.
* @memberOf Background
*
* @return {Object} Antitracking configuration parameters
*/
function getAntitrackingTestConfig() {
if (abtest.hasTest('antitracking_full')) {
return {
qsEnabled: true,
telemetryMode: 2,
};
}
if (abtest.hasTest('antitracking_half')) {
return {
qsEnabled: true,
telemetryMode: 1,
};
}
if (abtest.hasTest('antitracking_collect')) {
return {
qsEnabled: false,
telemetryMode: 1,
};
}
return {
qsEnabled: true,
telemetryMode: 1,
};
}

/**
* Adjust antitracking parameters based on the current state
* of ABTest and availability of Human Web.
*/
function setupABTest() {
const antitrackingConfig = getAntitrackingTestConfig();
if (antitrackingConfig && conf.enable_anti_tracking) {
if (!conf.enable_human_web) {
// force disable anti-tracking telemetry on humanweb opt-out
antitrackingConfig.telemetryMode = 0;
}
Object.keys(antitrackingConfig).forEach((opt) => {
const val = antitrackingConfig[opt];
log('antitracking', 'set config option', opt, val);
antitracking.action('setConfigOption', opt, val);
});
}
if (abtest.hasTest('antitracking_whitelist2')) {
cliqz.prefs.set('attrackBloomFilter', false);
}
// overlay search AB test
// if (abtest.hasTest('overlay_search')) {
// cliqz.enableModule('search');
// cliqz.enableModule('overlay');
// } else {
// cliqz.disableModule('search');
// cliqz.disableModule('overlay');
// }
}

/**
* Initialize Dispatcher Events.
* All Conf properties trigger a dispatcher pub event
You are viewing a condensed version of this merge commit. You can view the full changes here.
ProTip! Use n and p to navigate between commits in a pull request.