I mentioned my top choices for analytics tools (Pirsch & Plausible), but feel free to integrate any other tool you prefer and place it in the <head>
of the layout.tsx
file.
Step 1
GA-XYZ
ID.Step 2
@next/third-parties
package to your project using your preferred package manager.Step 3
Step 4
GOOGLE_ANALYTICS_ID
to the .env
file.Step 5