Forum Discussion

margiewaters's avatar
margiewaters
Contributor
11 years ago

blog article views in custom component

We are creating a custom component that includes our recent blogs. As part of this, we'll include the count of blog views for each article.

It seems like we are not seeing this number increment-so I'm not sure if we are looking in the wrong place to pull this number or maybe we aren't clear on what action is considered a view (as in, do you have to be logged in?)

Can anyone advise?

3 Replies

  •  

    margiewaters  - Considering that you're making correct REST call to pull the blogs, i.e.  /restapi/vc/blogs/id/[id] /posts/recent, you should be able to get the views count from view node. To verify, you can test it using this call,  /restapi/vc/messages/id/[id]/views/count

     

    Answer to your 2nd question, even the logged out user's views are counted, every refresh on the page increments the view count, I have tested it on our instance, so I'm pretty sure about this.

     

    Let me know if this helps.

     

     

  • margiewaters's avatar
    margiewaters
    Contributor
    11 years ago

     Thanks for your reply! I've shared this info with our developer.

     

     

  • Sorry for bringing up an old topic, but did you solve this problem? As I experience a similar issue.