I did not find any relevant info of how the "Views" section inside modern pages exactly work?

enter image description here

is it based on unique users visits? or per request visit? also how long will it take doe the Views counter to increment, is it based on the search service?

EDIT Also when i accessed the page from the Site Pages list, and i select the modern page, i got a popup box named File Statistics as follow:-

enter image description here

where it showed that i have 26 viewers with 353 views.

Also using the search api https://***.sharepoint.com/_api/search/query?querytext='ContentType:News*+path:https://***.sharepoint.com/'&selectproperties='Title,path,ViewsLifeTime,ViewsLifeTimeUniqueUsers' (as described in @vinit kumar reply) i got a property named ViewsLifeTimeUniqueUsers which showed the number = 99.

so in my case what do these numbers really represents "26" & "353" & "99" ?

  • it is based on per request visit not unique visitor as per my understanding. and Yes Views is based on Search service and counter will get Increment once Search Service crawled again and refresh the content Aug 14 '18 at 5:43

It is based on per page request by users not unique users visit and Yes Views is based on Search service and counter will get Increment once Search Service crawled again and refresh the content.If you still want to get the Page Unique Views then you can get using Search API as below


ViewsLifeTimeUniqueUsers - it's property to get Unique Page visitor

  • thanks for the reply. i think there is something missing as when i run your query i got an error that the query string "selectProperties" is missing or invalid.. so i chnage it to select, but on the returned result i did not find any xml property named ViewsLifeTimeUniqueUsers !!
    – john Gu
    Aug 14 '18 at 12:49
  • Above code is working code currently. May be you can share your complete search api url except your site url. Wanted to see what's the issue if it all it has. Aug 14 '18 at 15:13
  • 1
    Hi John, i think you have missed ' at the end of the URL. https://***.sharepoint.com/_api/search/query?querytext='ContentType:News*+path:https://***.sharepoint.com/'&selectproperties='Title,path,ViewsLifeTime,ViewsLifeTimeUniqueUsers' Aug 16 '18 at 5:37
  • 1
    ok i added the ' and i now i got the ViewsLifeTimeUniqueUsers for the modern page = 99 in my case. So i thought i have 99 unique users have actually accessed the modern page. but today when i select my modern page inside the site pages list, i got a popup box named File Statistic and it showed that i have 26 viewers + 345 views (i edit my original question with a picture of this box).. now 26 viewers is more realistic in my case.. so i am not sure what is the differences between ViewsLifeTimeUniqueUsers and the number of viewers i got inside my file statistic popup ??
    – john Gu
    Aug 17 '18 at 12:49
  • 1
    i think the link you provided talks about Visitors and Viewer from a permission level perspective,,,
    – john Gu
    Aug 17 '18 at 13:57

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.