Website hits counter?

Currently reading
Website hits counter?

DS220+ : DS1019+ : DS920+ : DS118 : APC Back UPS ES 700 — Mac/iOS user
Sorry if this is outside the scope of the forum (albeit related to running a website on Web Station).

My knowledge of building websites almost amounts to zero. However, I’ve managed to create and publish on my DiskStation a nice website using a Mac app called Sparkle. It generates pure CSS code (I hope that’s the correct description) and no scripts whatsoever. However, I can see that there’s an “embed” option if one needs it.

I’m looking for a way to know the number of hits on the website. I’ve tried Webalizer a long time ago, but it didn’t count anything (I might be at fault for missing something).

Now I’m trying to add a simple counter that counts the hits (when the page is loaded) to the bottom of the site.
Tried searching and I’m lost, most of them need a database (MySQL usually) or they’re third party services that one needs to sign too.

Anyone knows of a simple way to do this, or can point me to a site that can describe it in layman terms and doesn’t require creating a database or surrendering my soul in return?

Thank you for any help.
You can try with simple scripts like this:

or this one:

Just add the generated code to your HTML template file. CSS or LESS template files are for the look of your website.
Upvote 0
Thank you so much :)

I’ve checked both. The second one is really interesting as it provides statistics too. I can hide the counter behind an image (so it’s not clickable) and check their website for the statistics.

I’ll still try to create one that works internally and does not rely on an external website. Although it’ll probably provide hit counts only without the statistics. And it’ll require more understanding of websites black magic. For now, this one will do. Thanks again.
Upvote 0
I've made a tutorial so maybe it will help you to get started (but I'm not a Docker expert by any means):

Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to! is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!