by Nidin Shah

Project Overview

The purpose of this project is to monitor the number of visitors to my static website through a simple API integration provided by GoatCounter, an open-source web analytics platform.

Tools & Technologies:


Implementation

How I Added the Tracking Script

GoatCounter works by injecting a lightweight JavaScript snippet into each HTML page. I added the following script tag just before the closing </body> tag on each page:

<script data-goatcounter="<https://nidinshah.goatcounter.com/count>"
        async src="//gc.zgo.at/count.js"></script>

Screenshot 2026-05-09 192324.jpg

The data-goatcounter attribute connects to my personal GoatCounter endpoint, while the async attribute allows the script to load in the background without affecting page performance. I implemented this configuration across both pages using PowerShell directly on the repository files and pushed the updates to GitHub via Git. The changes were reflected almost instantly, making the deployment process efficient and straightforward

Which Pages Are Tracked

Two pages are currently being tracked:

Page URL
Main Portfolio nidinshah.github.io/
Projects Page nidinshah.github.io/projects/

Results / Dashboard

image.png