How to configure page view tracking

Question

How do I add page statistics tracking in CQ5?

Answer, Resolution

Similar to the Geometrixx site you can add the /libs/foundation/components/page/stats.jsp file to the end of the body of your all your pages (most likely via adding it to a global template jsp.

...
<cq:include script="/libs/foundation/components/page/stats.jsp" />
</body>

You can configure the URL for tracker.js under /libs/wcm/core/config.author/com.day.cq.wcm.core.stats.PageViewStatistics/pageviewstatistics.trackingurl for author and /libs/wcm/core/config.publish/com.day.cq.wcm.core.stats.PageViewStatistics/pageviewstatistics.trackingurl for publish.

Applies to

CQ 5.X

 Adobe

Get help faster and easier

New user?