Expand my Community achievements bar.

SOLVED

Client Context (cq/personalization/components/clientcontext) - AEM integration with Adobe Analytics

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 9

@Sreenivas,

AEM analytics is totally depend on client context and can't separate it. Client context is the visitor information holder. I don't think, there is any alternative for this.

--

jitendra

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

@Sreenivas,

AEM analytics is totally depend on client context and can't separate it. Client context is the visitor information holder. I don't think, there is any alternative for this.

--

jitendra