Official documented Api needed to fetch modern Pages View count
SharePoint modern pages Social bar View count apparently does not use Search Managed property ViewLifeTime or ViewsLifeTimeUniqueUsers. Fiddler traces shows that some Internal Apis are used to fetch modern pages social bar view count. It would great if Microsoft release Public documented API so that custom SPFx web parts/extension in need of modern page view count, could utilize the API
Thanks for your feedback! We’re reviewing your suggestion.
We are potentially looking into have this part of the future Microsoft Graph APIs for modern pages, but we cannot provide any schedule estimate for this work currently.
Logged a case with Microsoft and was provided with details of new managed properties that provide the right stats.
Using the Search REST API:
Instead of ViewsLifeTime, get ViewCount.
Instead of ViewsLifeTimeUniqueUsers, get ViewerCount.
Instead of ViewsRecent, get RecentViewCount.
Instead of ViewsRecentUniqueUsers, get RecentViewerCount.
This is something very important to expose, as this data can be used for many different reasons such as reporting and providing additional roll up information on webparts. We now have two different sources of truth and added inconsistency here.
We really need this functionality it creates such an inconsistent image of SharePoint when one section says one thing and another section like the Search Service ViewsLifeTime says something else!