Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
        • Browser ID
        • Geolocation data
        • Cookies
        • Sending events
        • Sending orders
        • Server-side tracking
        • Queueing events
        • Viewing events in Sitecore CDP
        • Running personalization
        • Finding the Sitecore Engage version number
    • IP allowlists
  1. Understanding integration details
  1. Understanding integration details

Queueing events using the Engage SDK

Using the Engage SDK, you can collect events and send them later in one go. This is useful when, for example, you want to conditionally chain different events depending on which actions your user takes.

To collect events, you can use the event queue. The event queue is a first-in, first-out array stored in session storage in the EngageEventQueue key. You can add any event with a valid payload to the event queue.

Important

The event queue requires that session storage is enabled. Because users can disable session storage, you should use try-catch blocks to handle errors when you're interacting with the event queue.

To interact with the event queue, you can use the following functions:

  • Engage.addToEventQueue() - to add event objects with a valid payload to the event queue.

  • Engage.processEventQueue() - to send all the events in the event queue, in the order the events were added. Then, this function empties the event queue.

  • Engage.clearEventQueue() - to empty the event queue without sending any of the events.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use