How can I find which pages users have recently viewed?
Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
Problem
We are hoping to learn insights on our site usage by reviewing which pages are being viewed recently and by which users. While we are aware there are Third Party Plugins that may extend this functionality for Confluence, we would like to run a query on the Confluence database to gather this information manually. Is this possible?
Cause
Currently, Confluence does not have a native function for tracking historical page views. We have a few open feature requests tracking this behavior:
- CONFSERVER-33386Getting issue details... STATUS
- CONFSERVER-43461Getting issue details... STATUS
Resolution
Recently viewed pages are stored in the AORECENTLY_VIEWED table in Confluence's database. The following query can be ran to see the data ordered by descending last view date and mapped to the user who viewed the page.
SELECT *
FROM "AO_92296B_AORECENTLY_VIEWED"
JOIN user_mapping u ON u.user_key = user_key
ORDER BY "LAST_VIEW_DATE" DESC;
Note that this table by nature tracks recency and does not contain all historical data for page views. If you are looking to track overall page views, you will need to consult the Atlassian Marketplace for plugins that may extend this functionality in Confluence.