Sub topic 11
Testing That Your Setup Works
Assume that you understand GA4 standard reports, referrers, and UTM parameters. You also need Editor access to the property, a browser with developer tools, and access to DebugView. Test in a development property when possible. A production test creates a real session and may affect reports.
Define the expected result
Test each signal separately. A UTM test checks campaign attribution. A referral test checks whether the browser sends an assistant referrer. A custom event test checks your tagging implementation. These tests can produce different results.
| Test | What it verifies | Where to check |
|---|---|---|
| UTM link | Source and medium values | Realtime and acquisition reports |
| Referral link | The browser-visible referrer | Browser tools and acquisition data |
| Custom event | Your event tag and parameter | DebugView |
| Channel group | The reporting classification | Reports or Explorations |
A custom channel group does not rewrite the original source or medium. It applies a reporting label when GA4 evaluates the session.
Test with a controlled link
Create a temporary URL that includes the source and medium your rule expects. For example:
https://www.example.com/pricing?utm_source=chatgpt.com&utm_medium=referral&utm_campaign=ai-testOpen the URL in a private browser window. Use a browser profile that is not blocked by consent settings, ad blockers, or an existing test configuration. If your site uses a consent banner, grant analytics consent.
In GA4, open Reports > Realtime and look for the test user. Confirm that the page view appears. Open the event details and inspect the available acquisition information. Depending on the GA4 report and property configuration, the values may take time to appear in standard acquisition reports.
The UTM test should produce values similar to these:
- Source:
chatgpt.com - Medium:
referral - Campaign:
ai-test
The exact dimensions shown in Realtime can differ from those available in standard reports. Do not treat a missing Realtime dimension as proof that the session was not collected.
Test an actual referrer
A UTM URL does not prove that document.referrer contains an AI assistant host. To test the referrer signal, click a link from a page whose origin you control, or click a real link in an assistant conversation.
Open your browser developer tools before clicking the link. On the destination page, inspect the request for the first page view. Check the Referer request header when the browser exposes it. You can also inspect the value in the page console:
document.referrerA result such as https://chatgpt.com/... indicates that the browser supplied a ChatGPT referrer. An empty string indicates that no referrer was supplied. Privacy controls, redirects, browser policies, and assistant behavior can remove or shorten this value.
Verify the event in DebugView
If you added a custom ai_assistant_visit event, enable the tag in your test environment and perform a fresh visit. In GA4, open Admin > DebugView. Select the test device and look for the event.
Expand the event and verify:
- The event name is exactly
ai_assistant_visit. - The
assistant_nameparameter contains the expected value, such asChatGPT. - The event fires once per intended visit rather than repeatedly on every page view.
- No unexpected assistant name appears because of a hostname-matching error.
DebugView only receives events from debug-enabled sessions. Google Tag Assistant, Tag Manager Preview, or the debug_mode setting can enable that status. Do not add debug settings permanently to all visitors.
Validate the channel group
After the test session is collected, open a report or Exploration that uses your custom channel group. Filter for the test campaign or landing page. Confirm that the session appears under AI Assistants, above the general Referral rule.
If the session appears as Referral, check rule order and the field used by the rule. If it appears as Direct, inspect the recorded source and referrer. If the event appears in DebugView but the channel does not change, the event and channel group are working independently. A channel rule normally classifies session acquisition values; it does not infer a channel from a custom event.
Allow for reporting delays before judging a failed test. Record the test URL, browser, timestamp, expected values, observed values, and the property used.
Exercise
Your custom event appears in DebugView with assistant_name set to ChatGPT, but the session remains in Referral. What should you check first?
Show answer
Check the custom channel group rule, its source field, and its position above the general Referral rule. The custom event does not automatically change session channel classification.