AnalyticsGoogle Analytics

Setting Up Google Analytics

Follow these steps to integrate Google Analytics.

Step 1: Create a Google Analytics Account

  1. Go to the Google Analytics website.
  2. Sign in with your Google account and create a new property for your website.
  • In the left-hand menu, navigate to Admin > + Create and select Property.
  1. You’ll receive a Measurement ID (e.g., G-XXXXXXXXXX).

Step 2: Add Measurement ID to .env.local

  1. In your project’s .env.local file, add the following environment variable:
    NEXT_PUBLIC_GOOGLE_ANALYTICS=G-XXXXXXXXXX