How to Track AI Referral Traffic in GA4 for a Law Firm Site

Create a custom channel group in Google Analytics 4 that collects visits from AI assistants, and learn why the number will always undercount.

AEO for Lawyers editorial teamUpdated · How we write and check

Short answer

In GA4, go to Admin, then Data display, then Channel groups, and create a new channel group with a channel whose conditions match the AI assistant sources in your own Session source and medium data. You need Editor access, standard properties allow two custom groups, and groups apply retroactively. Expect an undercount, since many AI visits arrive without referrer data.

Key takeaways

  • Custom channel groups are rule-based categories of traffic sources that apply retroactively in GA4.
  • You need the Editor role or higher, and standard properties can have two custom groups.
  • Look at your own Session source and medium report first. Source names change, and we have not verified a current list.
  • Referral counts will miss visits that arrive without a referrer.
  • Pair the channel with intake questions to see the whole picture.

What you will build

A custom channel group is a rule-based category of traffic sources in Google Analytics 4. You define a channel, such as "AI assistants," by conditions on dimensions like Source and Medium. Google's help page says custom channel groups apply retroactively to your existing data, that you need the Editor role or higher, and that standard properties can have two custom groups besides the predefined one (360 properties can have more). The page also includes an example for AI assistants.

Step 1: Find your own AI sources first

  1. Open the report

    In GA4, open Reports, then Acquisition, then Traffic acquisition.

  2. Change the dimension

    Use the dimension dropdown to switch the primary dimension to Session source / medium.

  3. Set a date range

    Pick at least the last 90 days so low-volume sources show up.

  4. Scan the list

    Look for sources that belong to AI assistants and AI search tools. Write down the exact source strings you see. We have not verified a current list of source names, and they change, so use only what appears in your data.

Step 2: Create the channel group

  1. Click Admin (the gear icon at the bottom left).
  2. Under the property column, open Data display, then Channel groups.
  3. Click Create new channel group and name it, for example "Default plus AI."
  4. Click Add new channel and name it "AI assistants."
  5. Add a condition group. Choose the dimension Source (or Session source), pick a match type such as "matches regex" or "contains," and enter the source strings you recorded in Step 1, separated with a pipe character if you use regex.
  6. Drag the new channel above any broader channel (such as Referral) that would otherwise capture the same visits, because GA4 assigns a visit to the first channel whose rules match.
  7. Save the group.

Menu labels in Google Analytics can change. If a step does not match what you see, follow the current instructions on Google's custom channel groups help page, listed in the sources below.

Step 3: Use it in reports

  • In the Traffic acquisition report, change the channel group dimension to your new group to compare AI assistants with Organic Search, Direct and Referral.
  • Add engagement and conversion events that matter to a law firm, such as phone call clicks and contact form submissions, if you have set them up.
  • Compare month over month rather than reading a single month.

Step 4: Understand the undercount

A referral count only includes visits that carry referrer information that matches your rules. Visits can arrive without it, for example when someone copies a URL into a browser or an app opens a link in a way that strips the referrer. Visitors who see your name in an AI answer and then search for your firm will show up as Organic Search or Direct. So the channel is a floor, not a total.

Add a question to your intake form or call script: "How did you find us?" with an option for AI assistants such as ChatGPT, Gemini, Perplexity, Claude or Copilot. Combine it with the audit method in run an AI answer audit.

Step 5: Document and review

  • Record which source strings your rule includes and when you added them.
  • Review the Session source / medium list every quarter and add new sources you see.
  • Annotate the dates you publish significant pages so you can connect changes in traffic to your work.

For the full measurement picture, see metrics that matter in AI search, and make sure the technical readiness checklist is complete so the traffic you want can arrive.

Common questions

Which source names should I include?

Start from your own data, not from a list. Open the Traffic acquisition report, change the dimension to Session source / medium, and look for sources that match the AI tools your visitors use. Source names change over time and we have not verified a current list, so add names only after you see them in your property.

Will this separate Google AI Overviews traffic?

We found no documentation that it will. Google says AI Overviews and AI Mode traffic is counted in the Web search type in Search Console, and we have no evidence of a separate source value for it in GA4.

I do not have Editor access. What do I do?

Ask the property administrator to grant it or to create the group. Do not share login credentials.

Sources

  1. Google Analytics Help: Custom channel groups
  2. Google Search Central: AI features and your website
  3. SparkToro: AIs are highly inconsistent when recommending brands or products

Informational only. This article is general education about search and AI visibility. It is not legal advice, it does not create an attorney-client relationship, and we do not guarantee that any statement in it is accurate, complete or current. No one can guarantee that an AI tool will name your firm. Lawyer advertising rules differ by state, so check your state bar's rules and talk to a qualified attorney before you publish claims about your firm. The update date above shows when we last checked.

Read next

How to Run an AI Answer Audit for Your Law Firm

A repeatable way to learn how often AI tools name your firm, which sources they cite and what they get wrong, using a spreadsheet and an afternoon.

See what Agency 310 builds

Agency 310 lists its services: AI strategy and consulting, workflow automation, customer engagement, and analytics. Pick the part of your operation you want to improve first.

View AI services