Opt a visitor out of Optimizely Performance Edge tracking.
Opt a visitor out of Optimizely Performance Edge tracking. For example, you may want to opt visitors out of Optimizely Performance Edge tracking as part of your site's broader opt-out preferences.
Note
On the first page load on which the microsnippet executes, this will only affect tracking (logx), and not experiment activation or evaluation. On subsequent payloads, the user will not get bucketed into any experiments.
If the Dynamic Websites project setting is on, using this API may also affect some experiment activation and evaluation on the first page load.
window.optimizelyEdge.push(optOut);
window.optimizelyEdge.push({
"type": "optOut",
"isOptOut": true
});
Parameters
This table provides general information about required and optional parameters.
Parameter | Type | Description |
---|---|---|
optOut required | object | An object with the type field set to optOut .The other fields are the function arguments. |
optOut.type required | string | The argument indicating that you are using the optOut function. |
optOut.isOptOut optional | boolean | It is possible to opt in a previously opted-out visitor. |
Verify opt-out mode is working
Setting
isOptOut
totrue
creates a cookie calledoptimizelyOptOut
.To verify it is working, you can:
- Check for the existence of the
optimizelyOptOut
cookie.- Append the
optimizely_log=DEBUG
query parameter. This prints the Optimizely Performance Edge log which shows if opt-out mode is activated.