- You often have case where you want to use Impression service provided by CQ to do custom operation for example finding top 10 most viewed page or sorting all page based on there popularity.
- It might possible that your impression data (Page Views) is in external system and then you want to import those data as impression in CQ to have more application context.
- You want to aggregate all data across all publish instances.
Here is example of how you can use this service
Once you are ready with all data you can use following service to use data,
You don't want to write your own service as mentioned in Approach 1 and use OOTB service available to you. Only problem with this is, You have multiple publish instance and some how you want to combine all data in to one so that you get accurate picture. It kind of tricky to get all data from all publish instance (through reverse replication) and then combine them on author and then push them over again. However you can use one instance to collect all stat data (king of single source of truth and then replicate it back to all instance every day)
- Make sure that you enable page view tracking by adding following line
- Then configure all publish instance to point to one DNS using following config (You can always override this under /apps)
- make sure that pageviewstatistics.trackingurl is pointing to single domain (You need to create a domain, something like impression.mydomain.com that will be stand alone CQ instance to take all impression request)
- Now you have consolidated page impression on one machine
- You can easily write a schedular which will run every night and reverse replicate all data to author instance.
- Once it is on author instance you can use replicator service to replicate to all other publish instance
- Then you can use code mention in approach 1 to get popular resources.