---
title: Disable cross origin
slug: web-experimentation/api/cV3F-disable-cross-origin
docTags: 
createdAt: 2026-08-05T20:56:17.000Z
---

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 do not fully support iframes, you may decide not to use cross-origin tracking. For more information, see [when not to use cross-origin tracking](docId\:D4cK9MtLwo5SilACqb_sh).

Call this API to disable cross-origin tracking and prevent 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.

### Syntax

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

### Parameters

| Parameter and Type                                | Child Attribute                                     | Description                                                                                                         |
| ------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **disableCrossOrigin** *DisableCrossOriginObject* | N/A                                                 | An object with the `type` field set to `disableCrossOrigin`. The other fields are the function arguments. Required. |
| **type** *string*                                 | Child attribute of type `DisableCrossOriginObject`. | The argument indicating that you are using the `disableCrossOrigin` function. Required.                             |

### Example call

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