# Add Google Analytics

URL: https://pro-weather.com/docs/google-analytics

> Measure your visitors by connecting a Google Analytics 4 (GA4) measurement ID.

Want to know how many people visit your weather site, where they come from and
which pages they look at? Connect a free **Google Analytics 4 (GA4)** measurement
ID and Pro Weather loads Google Analytics on your public site for you. There's no
code to add, you just paste one ID.

> **A Pro feature**
>
  Google Analytics is available during your **trial** and on the **Pro plan**.

## 1. Get a GA4 measurement ID

If you don't already have a Google Analytics account, you'll create a free one
and set up a **property** (a container for your site's data) with a **web data
stream**. The data stream is what gives you a **measurement ID** in the form
`G-XXXXXXXXXX`.

1. Go to [analytics.google.com](https://analytics.google.com) and sign in, or
   create a free Google Analytics account.
2. Open **Admin** (the gear icon), then under **Property** choose
   **Create property**. Give it a name and set your time zone and currency.
3. When prompted to start collecting data, choose **Web** as the platform. Enter
   your site's address (your `yourname.pro-weather.com` address or your
   [custom domain](https://pro-weather.com/docs/custom-domain)) and a stream name.
4. Google shows your **web stream details**, including the **measurement ID** at
   the top, in the form `G-XXXXXXXXXX`. Copy it.

Already have a property? Open **Admin → Data streams**, click your web stream,
and copy the **measurement ID** shown at the top.

  Pro Weather needs a GA4 **measurement ID** that starts with `G-`. An ID that
  starts with `GTM-` (Google Tag Manager) or `UA-` (the old Universal Analytics)
  won't work.

## 2. Connect it to your site

1. In your Pro Weather dashboard, open your site and go to **Settings**.
2. Find the **Google Analytics** card and paste your ID into the
   **Measurement ID** field.
3. Choose **Save settings**.

Changes apply to your public site immediately. To stop loading Google Analytics
later, clear the field and save again.

## How tracking and cookie consent work

Pro Weather respects your visitors' privacy choices. Your site shows a **cookie
consent banner**, and Google Analytics only loads **after a visitor accepts
analytics cookies**. Visitors who decline aren't tracked.

That means your GA4 reports cover consenting visitors rather than every single
person, which is exactly what privacy rules like GDPR expect. You don't need to
configure anything for this; it's handled for you.

## Check that it's working

1. Open your public site in a new tab and **accept analytics cookies** on the
   consent banner.
2. In Google Analytics, open **Reports → Realtime**. Within a minute or so you
   should see yourself counted as an active user.

If nothing shows up, see the troubleshooting steps below.

## Troubleshooting

### I don't see any data in Google Analytics

- **Give it a moment.** Realtime data appears within a minute or two; the
  standard reports can take 24-48 hours to populate.
- **Accept cookies first.** Analytics only loads after a visitor accepts
  analytics cookies on the consent banner. If you declined earlier, clear the
  site's cookies (or use a fresh private window) and accept this time.
- **Check the ID.** Make sure you pasted the `G-XXXXXXXXXX` measurement ID, not a
  `GTM-` or `UA-` ID, and that it matches the web stream for the URL you're
  visiting.

### The Measurement ID field rejects my ID

The field expects a GA4 measurement ID in the form `G-XXXXXXXXXX`. Copy it from
**Admin → Data streams → your web stream** to be sure you have the right value.

> **Still stuck?**
>
  Email [hello@pro-weather.com](mailto:hello@pro-weather.com) with your site
  address and we'll help you check the setup.

## Handy resources

- **[Google Analytics for web (developer guide)](https://developers.google.com/analytics/devguides/collection/ga4/web)**:
  Google's official overview of how GA4 collects data from a website.
- **[Set up Analytics for a website](https://support.google.com/analytics/answer/9304153)**:
  Google's step-by-step help article for creating a property and data stream.

## Next steps

- [Use a custom domain](https://pro-weather.com/docs/custom-domain)
- [Customize the appearance](https://pro-weather.com/docs/customizing/appearance)
- [Manage your plan](https://pro-weather.com/docs/account-billing/subscription)
