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 GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Hold events

Instruct the Optimizely Web Experimentation snippet to hold and enqueue events.

Use in conjunction with sendEvents for granular control over the timing of when the Optimizely Web Experimentation snippet sends events to the logging endpoint.

Syntax

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

Parameters

Parameter and TypeChild AttributeDescription
holdEvents
HoldEventsObject
N/AAn 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

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