Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

How to get the number of times a page got viewed in CQ5.6.1 programatically from CQAnalytics or sitecatalyst

Avatar

Level 4

Hi,

We have a requirement to show most read pages on top in a page. For this we have to get number of times a page got viewed by end user.

I am assuming that this we can do using analytics.

Can any one please let me know how to get page view count for a CQ page either using CQ_analtics, SItecatalust or Google Analytics.

 

Best Regards

Eakambaram Yadav

5 Replies

Avatar

Level 10

Within AEM, I think you can use the property 'Impressions' to get this fair count. but however any analytics tool can give you a better counts and you will have check the respective APIs to get those numbers.

ex: for GA, https://developers.google.com/analytics/devguides/reporting/?csw=1

Avatar

Administrator

Hi Eakambaram

The solution to your problem can be solved by ingratiation  third party web analytics as mentioned by Bsloki. I agree with last answer.

But apart from that, if you would like to write a small code to do tracking of our own, we can do it. 

Please have a look at the article covering writing a web analytics engine from scratch of your own Link : - http://coastalweb.ca/programming/writing-a-web-analytics-engine-from-scratch.html

This article will cover 

1.Grab any information from the URL (GET parameters) and server data (user agent, remote IP, referer [sic] URL)

2.Record the information in a database

3.Continue processing the page

 

I hope this would also help you.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 5

If you have access to external analytic service API to pull data. You can show that in author using Impression API in CQ. Example http://www.wemblog.com/2014/11/how-to-use-impression-service-in-cqaem.html

Yogesh

Avatar

Level 10

You can write AEM components that integrate with Analytics that determine page views. See this article for an idea (this article is for 6.1 - however - it will give you an idea)

https://helpx.adobe.com/experience-manager/using/analytics.html