The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I need to build a report that shows total and unique views for news articles posted to sharpoint.
I can see that the built in sharepoint analytics has this data, but I do not know what API or source to access it from? Can anyone help?
Solved! Go to Solution.
I made the tutorial Amitchandak linked - there is not an easy way to get page-level view metrics data. That tutorial is mainly for site-level aggregate data. The only place I know of that has it at page-level is the audit log, so you could query that, but you'd have to store it somewhere yourself and build up the history over time - it's not trivial to do, so there's not much content out there on it.
The API only goes back some number of days (90 iirc?), so if the news article is older than that it'll show less views. That's why you have to store it yourself, otherwise it'll start dropping at the 90 day mark. 🙂
I made the tutorial Amitchandak linked - there is not an easy way to get page-level view metrics data. That tutorial is mainly for site-level aggregate data. The only place I know of that has it at page-level is the audit log, so you could query that, but you'd have to store it somewhere yourself and build up the history over time - it's not trivial to do, so there's not much content out there on it.
Thank you. I have tried this following this guide https://www.leonarmston.com/2021/03/office-365-management-api-with-logic-apps-power-automate-includi...
As you indicated, it is quite an involved process. I'm storing the output of the logic app in a dataverse table but there seems to be a lot of missing data. e.g. The built in analytics for a news article on sharepoint has 67 views, but I only have 30 rows in my log table
The API only goes back some number of days (90 iirc?), so if the news article is older than that it'll show less views. That's why you have to store it yourself, otherwise it'll start dropping at the 90 day mark. 🙂