How to track HTML Website visitors?

How to track HTML Website visitors?

Yes! in this blog I will guide you on how you can see your website's analytics just by using a script tag. Before going to the main topic make sure you hosted your website on Vercel.

Let's start

Connect your website to Vercel analytics Code:

Make sure that you made a website and hosted it on vercel. To add the code go to your Vercel project and select the analytics tab

Vercel analytics tab

Click on the Audiences tab and also click the Enable button from the button. It's a beta program of Vercel.

Click on Enable button

Now go to your website and paste this code if you're using HTML, CSS, or JS.

You will see the pop-up, you can check this guide.

Vercel analytics tab

<script defer src="/_vercel/insights/script.js"></script>

But if you're using another tech stack such as Next.js you need to add @vercel/analytics it to your website. You can check the Official doc to see more details.

After adding this script tag just redeploy your website to Vercel & you will see the magic.

Magic

Analytics of my website

What are the features here?

  • Here are lots of features such as an analytics graph you can see the growth level of your website.

pages

  • You can see the most pages where visitors stay more. (It's my fresh website that's why it's showing less)

  • also, you can track the visitor's country, Operating systems, and even the Browser.

Visitors details

How cool the features are. Don't forget to add the code to your website.

Conclusion:

In this blog, we learned how we can easily see the analytics of a website by adding a script tag in just 5 minutes. If this blog helped you remember to share it & like it. Thanks.