Adding analytics to the portfolio page
So, if we're building our portfolio page, it's because we want visitors, right?
Well, kind of. We want to spark conversations and create connections, but we need people landing in our space to do so; and also, we need to measure whether our efforts to reach out to potential customers and posting on social media are thriving.
That's what being "data-driven" it's all about: find a reasonable way to gather data, then analyze it to take decisions.
The easiest way, is to start tracking visitors, so we can have a basic understanding of the changes in traffic whenever we take action.
So, we'll just use the built-in Vercel's analytics, which already includes 2.5K events for free (in the hobby tier). No custom events though :(
I haven't used Vercel's analytics before, but I'll give it a try. I might consider adding Google Analytics later or even Hotjar, to track users' interaction with the page.
💡 There are different types of tracking, I like grouping them as navigation and behavioral. Navigation will give you insights on your visitor count, raw time spent, location, etc; whilst behavioral will help you understand the actual interaction with your apps, find UX improvements, and more.
After turning it on, we just have to install the package and add the component to our root layout component:
import { Analytics } from '@vercel/analytics/next'; ... <Analytics /> </body>
💡When adding tracking for your site, watch out for potential performance hits. You'll need to find a balance between gathering information and additional requirements for your initial load; lazy loading and a good old lighthouse test are advised. Also, make sure to respect your user's privacy as well, by choosing options that respect the "Do not track" option.
We commit and push the changes, then head over to the dashboard to see the results after we visit our portfolio:
It works! We already have a mysterious visitor, wonder where did he came from lol
That's it! our really basic analytics tool will help us notice if the traffic in our page changes after certain events (e.g. contacting potential customers, posting on social media).
I'm choosing this type of tracking just for the convenience of having a single dashboard; but I might add Google Analytics later to (at least) support UTM parameters; so I can identify the source of my visitors. But, again, better done than perfect.
--
Update: I actually had the analytics running after reaching out to people for potential projects, and we already have some insights!
Long story short, I've found out that I've got visitors from countries I've reached out to, but they're not exploring the site (i.e. the blog, which is the only available section).
While not surprising, we can tell that people is indeed:
- Opening the link that points to jpgc.tech whenever I reach out to them.
- Not doing much afterwards (they leave the site).
Which can be considered an early validation of the usefulness of the portfolio page, while letting us now that the homepage needs improvements.
So, it's time to continue working on the homepage.