Implementation of "top 5 articles" component | Community
Skip to main content
Level 3
October 16, 2015
Solved

Implementation of "top 5 articles" component

  • October 16, 2015
  • 2 replies
  • 1301 views

Hi there

We have implement a component that does a live check against the JCR to return the 5 most viewed articles. By live i mean that every time the page is loaded the component queries the JCR. This component is also included in the majority of the pages in the site

The implementations is as follow,. We run a query which returns all articles

path=/content/mysite/en_GB/home type=cq:Page property=jcr:content/article/sling:resourceType property.value=/mysite/components/content/article p.limit=-1

We then iterate through the results and for each result we make an API call to PageviewReport to get how many times the page has been viewed over a period of time. 

Our concern is that this implementation is having an impact on performance, resulting in page loads failing SLA's. We also have SiteCatalyst. Will it be more efficient to get the page views information from analytics? Or we keep the current implementation but introduce a more efficient away of retrieving the article "viewed" information from the JCR  

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dkuntze

I think using Sitecat for this use case is your best bet. I have done something similar here:

https://github.com/dkuntze/acs-ars

It uses sitecat reports. It may not map directly to what you are requiring, but it should get you most of the way there.

2 replies

smacdonald2008
Level 10
October 16, 2015
dkuntze
Adobe Employee
dkuntzeAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

I think using Sitecat for this use case is your best bet. I have done something similar here:

https://github.com/dkuntze/acs-ars

It uses sitecat reports. It may not map directly to what you are requiring, but it should get you most of the way there.