Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Disable cross origin

Disable cross-origin tracking of visitor data.

Syntax

window["optimizely"].push(disableCrossOrigin);

Parameters

Parameter and TypeChild AttributeDescription
disableCrossOrigin
DisableCrossOriginObject
N/AAn object with the type field set to disableCrossOrigin. The other fields are the function arguments. Required.
type
string
Child attribute of type DisableCrossOriginObjectThe argument indicating that you're using the disableCrossOrigin function. Required.

Example Call

window["optimizely"].push({
  "type": "disableCrossOrigin"
});

Description

Optimizely Web Experimentation uses an iframe to seamlessly sync and preserve experiment variations, behavioral targeting, or event tracking across different domains, subdomains, security protocols, or ports. Because in-app browsers and certain performance monitoring tools like Catchpoint don't fully support iframes, you may decide not to use cross-origin tracking. For more information, see when not to use cross-origin tracking.

Call this API to disable cross-origin tracking and prevent Optimizely Web Experimentation from tracking a visitor's data across different origins. You must call this prior to each snippet initialization to disable cross-origin tracking.