Best way to implement a "most popular posts" page


I am creating a website for a client who specifically wanted a “most popular posts” page. To achieve this i implemented a custom helper (based on this ) to pull the views data from Google Analytics, and the helper works flawlessly on my development machine but i am unable to get ghost to register the helper in production. Currently it returns the error “Failed to lookup view “error-5xx” in views directory “/var/www/statefi-ghost/versions/2.27.0/core/server/views/””. What is the correct way to register an helper in production?

I have looked into creating a microservice that pulls data from GA and serves only the information i want available (accessing GA on the client-side does not sound like a good idea) so that i can securely access it with js within a ghost theme. The problem with this is that maintaining a separate service does not currently sound very attractive.

Anyone have any ideas on the easiest way to implement this feature?

Thanks in advance.

1 Like