Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Question about website

Hi, I have my website build using HTML, CSS , Javascript .

I want to display number a counter on my website which will increment every time any user over the world visits my website.

I do not have any database, I read online that for this I have to create a database but I do not know how and what code I need. Can anyone help me?

Steve Hunter Steven Parker Andy Artz Nick Pettit

1 Answer

Rich Donnellan
MOD
Rich Donnellan
Treehouse Moderator 27,671 Points

You probably don't want to code this up from scratch. I can't point you to a reputable source since this isn't generally implemented anymore, but if you do a basic search for "visitor counter for website", you should find something.

Check out this thread for a discussion as to why it's not common (circa 2015):

https://ux.stackexchange.com/questions/83819/why-are-visitor-counters-for-websites-not-used-any-more

You have a point