Adobe Data Layer Not Rendering on Some Sites After Cloning | Community
Skip to main content
New Member
July 30, 2025
Solved

Adobe Data Layer Not Rendering on Some Sites After Cloning

  • July 30, 2025
  • 2 replies
  • 582 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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 

2 replies

Ekhlaque
Adobe Employee
Adobe Employee
July 30, 2025

@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.
arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
July 30, 2025

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