Skip to main content
Level 1
July 6, 2026
Question

Seeking Guidance – Persistent Component-Level ID for Adobe Analytics in EDS/Universal Editor

  • July 6, 2026
  • 2 replies
  • 48 views

I’m looking for some guidance on a requirement we are currently working on in an Adobe Edge Delivery Services (EDS) / Universal Editor (Franklin) implementation.

Requirement

We need to assign a unique and persistent identifier to every component instance on a page and use that identifier as a tracking attribute for Adobe Analytics.

Example:

  • Multiple instances of the same component can exist on a page.
  • The identifier should remain unchanged even if the author reorders, moves, or updates the component.
  • The identifier should ideally persist for the lifetime of that specific component instance.

What We Have Explored

We have evaluated multiple options, including:

  • Generating UUIDs/random IDs in block JavaScript during rendering.

    • Drawback: IDs are regenerated on page refresh and are not persistent.
  • Generating IDs based on page structure, component sequence, or position.

    • Drawback: IDs change when authors reorder or move components.
  • Adding a hidden component-id field to the component model and attempting to populate it using Universal Editor events/extensions.

    • Challenge: We have not yet identified a reliable/supported mechanism in our current setup to automatically generate and persist the value back to the authored content for every new component instance.

Request

Has anyone in the community previously implemented:

  • Persistent component-level IDs in EDS/Franklin/Universal Editor?
  • Adobe Analytics tracking that requires a stable identifier per component instance?
  • Any Universal Editor extension/plugin approach that can generate and persist metadata during component creation?

If there are any reference implementations, sample code, past project experiences, or Adobe Analytics best practices that could help, I would greatly appreciate it.

Thanks in advance for your support.

 

Joseph

2 replies

Shashi_Mulugu
Community Advisor and User Group Leader
Community Advisor and User Group Leader
August 13, 2026

Hi ​@pjinfo ,

 

Are you able to solve this? What's the business case for this requirement?

AmitVishwakarma
Community Advisor
Community Advisor
September 18, 2026

Hi ​@pjinfo 

The requirement is valid, but the identifier must be persisted with the component instance. Generating it in the block JavaScript during rendering will not provide a stable value across page refreshes.  One important distinction:

  • The most likely correction is to replace the SharePointThe id in component-definition.json, such as hero or tabs, identifies the component type/definition. It is not a unique ID for each instance.
  • The data-aue-* attributes, including data-aue-resource, are used by Universal Editor for authoring and persistence. They should not be treated as the Analytics identifier for a component instance. link with the canonical folder URL. Admin consent may be required for the application-permission setup, but admin consent by itself will not fix the issue unless the correct application is granted Sites.Selected and then assigned site-level write access.

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/component-definition

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/attributes-types

Recommended implementation

Add a persisted property to the component model, for example: analyticsComponentId

Then implement the following behavior in the persistence layer:

  • When a component is created, generate a UUID if analyticsComponentId is empty.
  • Persist that value with the component content.
  • Preserve the value when the component is edited, reordered, or moved.
  • Generate a new value when the component is duplicated, because duplication normally creates a new component instance.
  • Do not reuse the value after the component is deleted.
  • Run a one-time migration to populate the property for existing components that do not have an ID.
  • Conceptually, the persistence logic should behave as follows:
    if operation == "add" and analyticsComponentId is empty:
    analyticsComponentId = generateUUID()

    persist component

    The ID should be generated at the backend/persistence boundary, not in the block rendering code.

  • Universal Editor exposes the aue:content-add event when a new component has been successfully added. This event can be used for notification or client-side follow-up processing, but an event listener alone is not a reliable atomic persistence mechanism. The listener would still need to call a backend API that saves the value. https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/events-universal-editor

  • For a robust implementation, use a custom Universal Editor persistence plugin or the relevant AEM persistence endpoint so that the ID is generated and saved as part of the component-creation flow. Universal Editor uses persistence services/plugins to write changes back to the underlying content system.

  • After the persisted value is available to the delivery layer, render it as a separate Analytics attribute, for example:

  • <div
    class="hero"
    data-component-type="hero"
    data-component-instance-id="8c3c1b4e-7b16-4b9e-a1a9-123456789abc">
    </div>

    The Analytics implementation can then send both values:

    componentType       = hero
    componentInstanceId = 8c3c1b4e-7b16-4b9e-a1a9-123456789abc

    The instance ID can be mapped to the appropriate Adobe Analytics eVar or Web SDK/XDM field, depending on the Analytics implementation.

  • If the project is using the standard AEM persistence integration without any customization, there does not appear to be a configuration-only option that automatically creates and persists a custom per-instance Analytics ID. In that case, the solution would require a custom persistence/plugin implementation or a controlled migration process for existing content.

  • A final consideration is whether the business really needs a lifetime identifier for each instance. For most reporting use cases, tracking the component type, page, location, and interaction is sufficient. A persistent instance ID is mainly useful when the business needs to follow the history or performance of one specific authored component instance across edits and moves.

 

Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME