---
title: Hold events
slug: web-experimentation/api/QNdl-hold-events
docTags: 
createdAt: 2026-08-05T20:56:13.000Z
---

Use in conjunction with [\`sendEvents\`](docId\:vVty9axT0Xnz-9iqQnavu) for granular control over the timing of when the Optimizely Web Experimentation snippet sends events to the logging endpoint.

### Syntax

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

### Parameters

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

### Example call

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