Sort posts by popularity


#1

The title says it all, I’m currently building a theme (hey handlebars is not that bad, something new but not hard to learn) and I need to put the posts in a sorted order by the posts that had the most views. Does ghost keeps track of that?

The idea is to put it where it says 1, 2, 3 on the image below:


#2

@afern247 Ghost doesn’t track views. Typical use-case is having Ghost behind a CDN or cache so most page views won’t actually hit the Ghost server for it to be able to track page views.

If you want statistics/analytics it’s recommended to use a 3rd party service such as Google Analytics or similar that is designed for that purpose. Some of them may have APIs that you can query in your client-side JS or via a small microservice of your own to get your “most viewed” post list.


How do we know the count of reads of a post?
Get the most viewed posts
#3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.