Displaying number of views on my blogdown-based website

I've built a website using blogdown and wondering if there is a way to display how many times my page has been visited.

Thanks in advance!

I think you can get this type information from Google Analytics from what they worth. How to incorporate it depends also on your hugo theme used

See example and mentions in blogdown book

It uses Hugo supported feature : https://gohugo.io/templates/internal/

See also this question https://stackoverflow.com/a/47918446

You'll find some post on the web for google analytics and Hugo I think.

How to have this information could also be integrated in where you deployed your website maybe.

In anycase this is external to blogdown or hugo and is to put in place with your deployment choice yourself, or using a service like google analytics. There is sefl hosted solution too for example: https://matomo.org/

When you have plug in the analytics, you would be able to retreive the page visit information in you post I think. Example : https://discourse.gohugo.io/t/total-number-of-views/9729

Hope it helps.

1 Like

Thank you @cderv for positing these helpful links! I'll go theough it and see how it wirks.

1 Like

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