Hi All,
We have integrated AEM with Adobe Analytics. Tracking is happening in all the pages (parent/child) both in author and publisher with the inclusion of the below scripts in our base component body.html
<div data-sly-resource="${ @path='clientcontext', resourceType='cq/personalization/components/clientcontext'}"> </div>
<div data-sly-resource="${ @path='cloudservices', resourceType='cq/cloudserviceconfigs/components/servicecomponents'}"> </div>
If our requirement is to capture the metrics of a page and all sub pages, the inclusion of client context(cq/personalization/components/clientcontext) is really required ?
But if we don't include client context, tracking is not happening and we are getting "Uncaught ReferenceError: CQ_Analytics is not defined".
We also tried including the below 'core personalization' client libs used by clientcontext directly in our component instead of clientcontent, but it fails tracking and shows the same error "Uncaught ReferenceError: CQ_Analytics is not defined"
<meta data-sly-call="${clientLib.all @ categories='personalization.core.kernel'}" data-sly-unwrap></meta>
<meta data-sly-call="${clientLib.all @ categories='personalization.core'}" data-sly-unwrap></meta>
<meta data-sly-call="${clientLib.all @ categories='personalization.core.ui'}" data-sly-unwrap></meta>
Please let us know any alternative for clientcontent for analytics to work with AEM.
Thanks in Advance
Sreeni