Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

Adobe Data Layer Not Rendering on Some Sites After Cloning

Avatar

Level 1

I'm working with a custom AEM component that includes the Core Image component (core/wcm/components/image/v3/image) inside it. The component renders correctly and includes the data-cmp-data-layer attribute for anchor tag (for Adobe Data Layer) in some sites, but not in others, even though the component and content were cloned from a working site.

For example:

  • In /content/mysite, the image renders inside an <a> tag and includes the data-cmp-data-layer attribute.

  • In /content/clonedsite, the exact same component and authored image show no data-cmp-data-layer attribute in the DOM.

  • And if changes site name to some other names, for some names its working.

What I Checked So Far:

  • The cq:dataLayer = true property is present in the template policies for both sites.

  • The image component has the correct sling:resourceType = core/wcm/components/image/v3/image

  • The <a> tag wraps the image in both places, but data-cmp-data-layer is missing only in the broken ones.

  • No JS errors in the browser console, and the core component clientlibs are loading.

  • Both sites use editable templates, and the page component extends core/wcm/components/page/v2/page

 Questions:

  1. What else could cause the data-cmp-data-layer to be missing, specifically on cloned sites?

  2. Does the node name (e.g., image) or path affect how the data layer renders?

  3. Are there hidden dependencies between the template policy and the rendering of data-cmp-data-layer?

Any help or ideas to debug this further would be appreciated!

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @TejashreeNH 

YOu need to enable data layer from CA config

please check the CA config (com.adobe.cq.wcm.core.components.internal.DataLayerConfig) for mysite at  /conf/mysite/sling:configs/ and create same for /content/clonedsite at /conf/clonedsite/sling:configs/ 

 

https://github.com/adobe/aem-core-wcm-components/blob/main/DATA_LAYER_INTEGRATION.md 

Arun Patidar

AEM LinksLinkedIn

View solution in original post

2 Replies

Avatar

Employee

@TejashreeNH  ,In your use case ,we may need to compare node structure, are both site roots cq:Page nodes and do all ancestor nodes have correct properties?
Also validate template policy mapping,

  • Entry exists under /conf/.../settings/wcm/policies/... for cloned site/template?
  • Policy includes cq:dataLayer=true and is correctly referenced.

Avatar

Correct answer by
Community Advisor

Hi @TejashreeNH 

YOu need to enable data layer from CA config

please check the CA config (com.adobe.cq.wcm.core.components.internal.DataLayerConfig) for mysite at  /conf/mysite/sling:configs/ and create same for /content/clonedsite at /conf/clonedsite/sling:configs/ 

 

https://github.com/adobe/aem-core-wcm-components/blob/main/DATA_LAYER_INTEGRATION.md 

Arun Patidar

AEM LinksLinkedIn