What is your solution for pageviews counters?

I’d like to implement a “xxx total views” widget on my articles. Does anyone have a quick solution for such feature ?

Additional info : I don’t want to generate the JSON on the server since I’m using S3, and I’d rather use some external service to do that (to avoid counting bots and so on).

1 Like

I need similar solution.

This isn’t a Hugo question, as it will have to be an external resource, like some analytics or tracking widget. At that point it is just adding whatever JavaScript to a template.

On the other hand, please don’t do that. It is a silly thing, more vanity than social proof, and serves no purpose except to impress gullible humans. Don’t be a gullible human. :slight_smile:

1 Like

I ended up coding something (more complicated than needed) using Firebase.
I always wanted to publish a documentation about it, but … you know… lack of time.

If you guys are still looking, I’ll try to find my code, and publish it somewhere.

3 Likes

Hi @tanzaho, could you share your current solution?
I am thinking of using hugo data to consume google analytics pageviews metrics, but the setup is quite clumsy and there is a ~2 sec latency in showing it.
I wonder if there are better solution, thanks.

Closing this topic as it is 3 years old now and not a Hugo-specific question. Please do not resurrect years-old topics.