logo
Local Environment

Google Analytics

Google Analytics

Make sure you already have a Google Analytics account before proceeding.

Framecast AI supports Google Analytics out of the box. You just need to create a property and add the tracking values to your .env file.

Create a Google Analytics Property

Go to your Google Analytics dashboard and click the Settings icon from the sidebar. Click Create and select Property from the dropdown. Fill in the required details (Property Name, Business Details, Business Objectives) and click Create. Choose Web as the platform, enter your website URL and a stream name, then click Create & Continue.

Google Analytics — Creating Property

Get Your Tracking Values

After creating the property, a setup dialog will appear. Select the Install Manually option. You will see two values you need to copy:

  1. The full src URL (looks like https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX)
  2. The measurement ID (looks like G-XXXXXXXXXX)
Google Analytics — Tracking ID Setup

Update Your .env File

Open your .env file and replace the Google Analytics placeholders with the values you copied:

# Full script URL including https://
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID_VALUE=G-XXXXXXXXXX

Replace G-XXXXXXXXXX with your actual measurement ID in both lines.

You can verify the integration is working by clicking the Test button in the Google Analytics setup dialog. Once confirmed, analytics will start tracking automatically.