In this page, we will see how to setup Google Analytics for an application.
To-do list
You will need to get your GA_MEASUREMENT_ID
token. Here are the steps to get it:
Go to the Google Analytics website and create an account and a new property.
In Admin, under Data collection and modification, click Data Streams
Select the Web tab.
You will get your GA_MEASUREMENT_ID
at the top right corner.

Google Analytics Measurement ID location
If you have issues, you can also refer to the google analytics developer guide to get started.
Useful links
- Google Analytics
- Find your Google Analytics Measurement ID
- Google Analytics for developers
- Setup Google Analytics for a website or an app
Environment variables
# ============================================
# 📊 ANALYTICS
# ============================================
# For Google Analytics
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
NEXT_PUBLIC_GA_DISABLE_LOCALHOST_TRACKING=true
NEXT_PUBLIC_GA_DISABLE_PAGE_VIEWS_TRACKING=false
Analytics
Tools to track user behavior and events using different analytics providers.
Umami
Umami is an open-source analytics solution.
How is this guide?
Last updated on 10/17/2025