> ## Documentation Index
> Fetch the complete documentation index at: https://docs.noisemaker.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer-site measurement

> Install the GA4 tag and complete Search Console verification on a customer site.

The application can read a customer's GA4 and Search Console evidence only after the property exists, the site is instrumented or verified, and the workspace email has been granted access.

## GA4 browser tag

Set the public measurement ID in the customer site's web deployment:

```bash theme={null}
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
```

The current frontend integration renders no Google tag when this value is absent. When present, it configures Google Analytics with automatic page-view sending disabled, then sends one page view for the initial URL and each client-side pathname or search change. It deduplicates the same URL to avoid development strict-mode repeats.

<Warning>
  The browser value beginning with <code>G-</code> is a measurement ID. The workspace connection uses the numeric GA4 property ID. They are not interchangeable.
</Warning>

## Search Console verification

For a URL-prefix property, set:

```bash theme={null}
NEXT_PUBLIC_GSC_VERIFICATION=google-site-verification-token
```

The frontend emits the corresponding verification meta tag only when the value exists.

A domain property such as <code>sc-domain:example.com</code> requires the DNS TXT verification supplied by Search Console. The HTML meta tag cannot verify the whole domain property.

## Grant workspace access

After provisioning the workspace AgentMail address:

<Steps>
  <Step title="Invite it to GA4">
    Grant the address Viewer access on the numeric GA4 property.
  </Step>

  <Step title="Invite it to Search Console">
    Grant the address Full access on the Search Console property.
  </Step>

  <Step title="Save the properties">
    Store <code>ga4\_property</code> and <code>gsc\_property</code> in <code>brands/\<workspace>.yaml</code>.
  </Step>

  <Step title="Run the connection tests">
    Run each connection test from the workspace Connections settings.
  </Step>
</Steps>

## Content security policy

The current application does not install a consent platform or a site-wide CSP for you. If the customer site has a CSP, allow the Google tag script and analytics connection hosts required by that installation. If consent gating is added later, mount the analytics component only after consent.

## Verification checklist

<Steps>
  <Step title="Check the initial view">
    In GA4 DebugView, load a clean URL and confirm one page view.
  </Step>

  <Step title="Check client navigation">
    Move between application routes and confirm one new page view per URL, including intended query-string changes.
  </Step>

  <Step title="Check Search Console ownership">
    Confirm the URL-prefix meta tag or domain DNS record is verified.
  </Step>

  <Step title="Inspect a URL">
    Use Search Console URL Inspection and submit a sitemap when the site provides one.
  </Step>
</Steps>

Connection status inside the platform cannot inspect the property member list. Verify the external invitation in Google when access tests fail.
