Hi,
We are trying to integrate AEM 6.0 with Adobe Analytics for site tracking. We have the below issue.
We have applied the site catalyst frame work to a parent page( say /content/en) and tracking is happening on this page( we can see the tracking info in Adobe Debugger as well as in reports in Adobe Marketing Cloud), where as the child pages under /content/en are not tracking.
As per the adobe documentation, "When you associate a web page with a framework, the framework performs tracking for that page and all descendent pages"
But when we see the page properties of child pages under 'Cloud Services', the analytics framework got inherited from parent page. But tracking is not happening.
Please help me, if I am missing any other configuration, to make my child pages also start tracking.
Thanks in advance.
Sreeni
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
To answer to your last query :-
<div data-sly-resource="${ @path='clientcontext', resourceType='cq/personalization/components/clientcontext'}"> </div>
<div data-sly-resource="${ @path='cloudservices', resourceType='cq/cloudserviceconfigs/components/servicecomponents'}"> </div>
Only the AEM 5.6 documentation(https://docs.adobe.com/docs/en/cq/5-6/administering/integrating_with_adobe_marketing_cloud/sitecatal... ) suggests to include these scripts, not AEM 6 and 6.1.
So,
We still have same documentation for 6.1.
Link:- https://docs.adobe.com/docs/en/aem/6-1/develop/extending/sitecatalyst/sc-components.html
//The clientcontext script that you insert after the body element adds the Client Context features to the page.
The cloudservices script that you add before the body end element applies to the cloud services configurations that are added to the page. (If the page uses more than one Cloud Services configuration, you need to include the ClientContext jsp and the Cloud Services jsp only once.)
And to answer your nested Analytics question, i would like you to try this as a debugging option :-
Link:- https://docs.adobe.com/docs/en/aem/6-1/administer/integration/external-providers.html
//Analytics with External Providers,
If the configuration is attached to the page that has child pages, the service is inherited by those as well.
And Try this community article as well :-
Link: https://helpx.adobe.com/experience-manager/using/analytics.html
//Integrating Adobe Experience Manager 6.1 Components with Adobe Analytics
I hope these are some way to proceed further, i hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
To troubleshoot this, see if the Analytics code is being loaded on the page. Look at the code in a tool and see if you can locate the JS libs.
Views
Replies
Total Likes
The required analytics JS is not loaded in the child pages. For your info we are using Adobe DigitalPulse Debugger to capture the tracking.
When we associate analytical framework to a page(say /content/en), under /content/en/jcr:content there are 2 childe nodes image and analytics will be created. And one cq:cloudservicesconfig property will be added to jcr:content node.
These nodes and property is not being added to child pages.
Please let me know, if you any other details.
Views
Replies
Total Likes
Adding to the above details, in the parent page, where tracking is working, we can see the below site catalyst scripts are loading.
<script type="text/javascript" src="/etc/clientlibs/foundation/sitecatalyst/sitecatalyst.min.js"></script>
<script type="text/javascript" src="/etc/clientlibs/foundation/sitecatalyst/util.min.js"></script>
<script type="text/javascript" src="/content/sample/dfssdsdsds991232cdfd9991/pdf/_jcr_content/analytics.sitecatalyst.js"></script>
<script type="text/javascript" src="/etc/clientlibs/foundation/sitecatalyst/plugins.min.js"></script>
And below the above script tags, we can see inline analytics script which maps cq variables to site catalyst variables.
CQ_Analytics.Sitecatalyst.updateEvars = function(options) {
this.frameworkMappings = [];
// code for mapping cq variables to sc variables
for (var i=0; i<this.frameworkMappings.length; i++){
var m = this.frameworkMappings[i];
if (!options || options.compatibility || (options.componentPath == m.resourceType)) {
CQ_Analytics.Sitecatalyst.setEvar(m);
}
}
}
But none of the above scripts are loading for child pages.
Please let me know, if any other information is required.
Views
Replies
Total Likes
Hi All,
AEM integration with Adobe Analytics is successful and 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>
Only the AEM 5.6 documentation(https://docs.adobe.com/docs/en/cq/5-6/administering/integrating_with_adobe_marketing_cloud/sitecatal... ) suggests to include these scripts, not AEM 6 and 6.1.
Please let us know the side effects of including them in AEM 6 and also explain the need of these scripts and any alternative.
Thanks in Advance
Sreeni
Views
Replies
Total Likes
Hi
To answer to your last query :-
<div data-sly-resource="${ @path='clientcontext', resourceType='cq/personalization/components/clientcontext'}"> </div>
<div data-sly-resource="${ @path='cloudservices', resourceType='cq/cloudserviceconfigs/components/servicecomponents'}"> </div>
Only the AEM 5.6 documentation(https://docs.adobe.com/docs/en/cq/5-6/administering/integrating_with_adobe_marketing_cloud/sitecatal... ) suggests to include these scripts, not AEM 6 and 6.1.
So,
We still have same documentation for 6.1.
Link:- https://docs.adobe.com/docs/en/aem/6-1/develop/extending/sitecatalyst/sc-components.html
//The clientcontext script that you insert after the body element adds the Client Context features to the page.
The cloudservices script that you add before the body end element applies to the cloud services configurations that are added to the page. (If the page uses more than one Cloud Services configuration, you need to include the ClientContext jsp and the Cloud Services jsp only once.)
And to answer your nested Analytics question, i would like you to try this as a debugging option :-
Link:- https://docs.adobe.com/docs/en/aem/6-1/administer/integration/external-providers.html
//Analytics with External Providers,
If the configuration is attached to the page that has child pages, the service is inherited by those as well.
And Try this community article as well :-
Link: https://helpx.adobe.com/experience-manager/using/analytics.html
//Integrating Adobe Experience Manager 6.1 Components with Adobe Analytics
I hope these are some way to proceed further, i hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
In order to make all child pages inherit the analytics code, the Site Config page must be setup. However sub-sites will not inherit the analytics code.
//
How do I create a Site Configuration page?
1. In the WCM, create a new page at the root level of your site by clicking New…
2. Scroll to the bottom of the templates list and select Site Config Page (new CLF).
3. Enter "Site Configuration" in the Title field.
4. Name the page "siteconfig".
A site configuration page needs to be linked to the root (home) page of your site.
1. Open the Site Configuration page in the Editing window.
2. Double click the Home Page and Parent Site Page component at the top of the template.
3. Click the magnifying glass icon in the Home Page field and navigate to the home page of your site.
4. Click OK.
Adding custom stylesheets and scripts
Every site includes the default SFU stylesheets and scripts. In order to build upon this foundation, you can develop your own custom stylesheets and scripts. To add custom stylesheets or scripts:
1. Add the .css or .js file to the DAM. (You may wish to organize your files into appropriately-named folders in order to protect them from other authors.)
2. From the Site Configuration page, double-click the Site Libraries component. Click on the [+] beside the appropriate field and navigate to the file in the DAM. Your style/script will be loaded on both the home page and all child pages of your site.
Note: JavaScript files are disabled in the authoring environment when in Edit mode. To preview JavaScript behaviour, go into preview mode and refresh your browser.
Secondly , check this community article:- https://helpx.adobe.com/experience-manager/using/analytics.html
//Create an AEM site (based on the templateAnalytics page component) that contains a page and a child page. The TopNav component reads the child page and provides a link to access the child page. When a user clicks the link to the child page, data is sent to Adobe Analytics.
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Views
Likes
Replies