Hello Team,
We are utilizing the out-of-the-box adobeDataLayer Object for analytics purposes. We have added some custom attributes to this object using the approach outlined below:
Sling Delegation Pattern:
This is a recommended approach for customizing data layer attributes for components.- Extend the com.adobe.cq.wcm.core.components.models.datalayer.ComponentData interface.
- Override the get Data() function to include your custom variables within the returned ComponentData object.
Problem Statement:
1) All custom attributes are correctly added to the adobeDataLayer object in the Publish environment.
2) However, when accessing the same page via the dispatcher URL, the adobeDataLayer only shows out-of-the-box attributes, and none of the custom attributes are present.
We have reviewed all logs in the dispatcher but found no indications of the issue. Is there a specific URL that is called with certain extensions that might be blocked at the dispatcher level? We have gone through multiple articles but could not find any details. Any help or pointers would be appreciated. Thank you.