2

I've just noticed in SPO in Office 365, in the pages library they show page views.

SPO Page Views

Any ideas how one would go about getting that via REST or another method to display that in the page layout?

2

Use REST API and managed properties to get page views

For recently viewed page you can use "ViewsRecent" and while "ViewsLifeTime" is update every 14 or 15 days.

You can use SharePoint 2013 Search Query Tool to generate REST queries on the fly and refine searches

enter image description here

https://some-SharePoint-online-tenant.sharepoint.com/_api/search/query?querytext='*'&rowlimit=10&sortlist='viewsrecent:descending'

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.