---
title: Disable
slug: web-experimentation/api/Ops8-disable
docTags: 
createdAt: 2026-08-05T20:56:13.000Z
---

Disable Optimizely Web Experimentation entirely. You must call `disable` prior to loading the Web Experimentation snippet.

You can also disable just Web Experimentation tracking calls from being made using the parameter scope `tracking`.

:::hint{type="warning"}
**Important**
You must define the Optimizely object before calling the Disable API.
:::

### Syntax

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

### Parameters

| Parameter and Type          | Child Attribute                          | Description                                                                                                     |
| --------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| **disable** *DisableObject* | N/A                                      | An object with the `type` field set to `disable`. The other fields are the function arguments. Required.        |
| **type** *string*           | Child attribute of type `DisableObject`. | The argument indicating that you are using the disable function. Required.                                      |
| **scope** *string*          | Child attribute of type `DisableObject`. | You can disable just Web Experimentation tracking calls from being made using the parameter scope `"tracking"`. |

### Example call

```javascript
// Ensures the optimizely object is defined globally  
window['optimizely'] = window['optimizely'] || [];

// API call
window["optimizely"].push({
  "type": "disable"
});
```
