Is there a way to get the total number of page views of a page in SharePoint using Rest API or JSOM?
I tried using Search API
http://SiteUrl/sites/_api/search/query?querytext='home'
But in all the results, the ViewsLifeTime is null I enabled search and crawl for the managed property (ViewsLifeTime) and ran a full crawl as suggested here, but still the values were null.
Also the ViewsRecent
column is null as well
Is there any other way ? Am I missing something like a mapping?
ViewsLifeTime
is updated around every 2 weeks whileViewsRecent
shows visitors of the recent time span. Have you had your page at least for the couple of weeks so thatViewsLifeTime
could have received some value?