lchoo2@wisc.edu
ffc

Ley Kwan Choo

Software Engineer at K

Just came across a super cool feature offered by Vercel for web analytics! and it’s free and easy to implement it!

drawing

It offer Speed insights too! You can read more here.

What’s does Vercel Web Analytics do?

It offer insights of your web traffic, such as top pages, top referrers, and demographics such as countries , operating systems, and browser information.

Do you need this?

Personally, I implemented it because it’s just so cool to track your web traffic and see where your visitors are from!

And most importantly, it’s free! So why not?

How to implement it?

Since I’m using Astro JS, I’ll briefly explain how to implement it in Astro JS.

I am assuming that you have already created a Vercel account and have a project in Vercel.

Step 1: Enable analytics in your astro.config.mjs file.

drawing

Source: Astro on X

Step 2: Go to your project in Vercel and click on the Analytics tab!

Step 3: Select your framework and copy the code snippet! Make sure to redeploy your project after adding the code snippet! drawing You’re all set!

Limitation: You can’t track everything.

If the user has certain blocker extension activated, the analytics will not be tracked as the script.js that was sent to the client will be blocked.

drawing

You could track it by inspecting the network tab in your browser.

Correct me if I’m wrong, but Incognito mode will be tracked too!

That’s all from me today! I hope you find this useful!

Written by

ffc

Ley Kwan Choo

Software Engineer at K

<- Back to HomeShow all other posts ->