There are many forms of analytics on websites today. From more traditional tools to behavior-based tools, you can learn a lot about what your users are doing with your website.

The most popular analytics tool is Google Analytics. This is, in part, because you can measure and report on many metrics without a financial investment.

Adding Google Analytics

Here's a tutorial that walks through adding Google Analytics to a Next.js site.

But there are tradeoffs, and Google Analytics isn't necessarily a great fit for every website.

If you know what you want to add, great! There is likely a guide on that tools website on how to incorporate it into a Next.js (or React) application.

Here are a handful of other popular options out there today if you want to explore some alternatives.

A Word of Caution

No matter what you decide to add to your site, be cognizant of the code you are adding. Many of these services ask you to inject render-blocking scripts into your page. This can hurt the performance of the page for your users.

When adding third-party tools, it's important to balance the convenience of metrics with the effect on user experience.