Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
            • Settings object
            • Extension data object
            • Personalization data object
        • Troubleshooting
        • Release notes
  1. Objects
  1. Stream API
  2. Objects
  3. Extension data object

Extension data object

Use the extension data object to collect custom data about an event that you then send to Sitecore Personalize. This is an optional object that you can specify as the last function argument when you send events. This object accepts a maximum of 50 custom attributes of your choice.

After you send the event, the data in this object becomes available for personalization and decisioning.

When you build this object, use a flat object structure. Sitecore Personalize automatically flattens nested objects and renames the keys as necessary. For example:

Nested object:

{"params":{"customObject":{"number":"16"}}}

Flattened object with renamed key:

{"params_customObject_number":"16"}

Here's an example of how to use the event() function to send a custom event called myretailsite:CLICKED_POPUP. eventData contains all the required attributes for the event data object. extensionData contains the custom data.

import { engage } from "./engage.js";
// ...

const handleClick = async (e) => {
    e.preventDefault();

    const eventData = {
      channel: "WEB",
      currency: "EUR",
      pointOfSale: "myretailsite/ireland",
      language: "EN",
      page: "home"
    };

    const extensionData = {
      customKey: "customValue"
    };

    await engage.event("myretailsite:CLICKED_POPUP", eventData, extensionData);
};
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