A simple PHP and JavaScript AJAX hit counter that counts and displays the number of hits for each page on your website.
- Create a
<span id="hit-count"></span>
element on every page where you want to display the hit count number for that page. - Copy the
<script src="hit-counter/js/script.js"></script>
declaration on every page you created the above element on. - Copy the hit-counter folder to your web server.
- Thats it! If everything works, you should start seeing the hit count being displayed on each page you added it to and the hit-counter/hits.json file being populated.
See the example.html file for how to create the element and declare the JavaScript.
If you like this repo or used any of the code, please star ⭐ it and consider supporting me below...