---
title: Opt out
slug: web-experimentation/api/d8Gy-opt-out
docTags: 
createdAt: 2026-08-05T20:56:13.000Z
---

Opt a visitor out of Optimizely Web Experimentation tracking by disabling Web Experimentation. For example, you may want to opt visitors out of Web Experimentation tracking as part of your site's broader opt-out preferences.

### Syntax

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

### Parameters

| Parameter and Type        | Child Attribute                         | Description                                                                                                                      |
| ------------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **optOut** *OptOutObject* | N/A                                     | An object with the `type` field set to `optOut`. The other fields are the function arguments. Required.                          |
| **type** *string*         | Child attribute of type `OptOutObject`. | The argument indicating that you are using the `optOut` function. Required.                                                      |
| **isOptOut** *Boolean*    | Child attribute of type `OptOutObject`. | You cannot opt in a previously opted-out visitor because opting a visitor out blocks the entire Optimizely snippet from loading. |

### Example call

```javascript
window["optimizely"].push({
  "type": "optOut",
  "isOptOut": true
});
```
