AI visits to your website? Of course Google Analytics 4 can track those!

OK, ChatGPT this, AI that… Nothing will ever be the same!
Want to know how much of your web traffic comes from AI agents? Of course, GA4 can give you that info 😉 Here’s how:

How can we track AI traffic in GA4? Right now, you see it as “Referral” traffic, so it’s best to either create your own new channel grouping (Default Channel Grouping) or edit an existing one you’ve already set up.

Note: If you’ve already prepared your own custom channel grouping, since you can’t edit the Default Channel Grouping (you can only copy it), feel free to skip the first four steps.

If you haven’t prepared your custom grouping yet, here’s how to do it:

  1. Go to the Admin section in Google Analytics 4.
  2. Under “Data Display,” find “Channel Groups
  3. Select “Create new channel group” (the blue button in the first image), or click the three dots next to “Google Analytics predefined channel group” and select “Copy to create new” – they’ll both get you to the next step 🙂
Image 1: Creating a new Channel Group in Google Analytics 4

Steps for setting up new channel for AI traffic

Next steps are the same for everyone:

  1. Add a new channel by clicking “Add new channel” (Image 2).
    (Remember the “Reorder” button next to this, we’ll need it later)
Može biti slika sljedećeg: tekst
Image 2: Adding the new custom channel into existing channel grouping definition
  1. Name your channel something like “AI Traffic” or “Artificial Intelligence” – your choice.
  2. For the conditions, set Source – Matches RegEx – ^.ai|.*\.openai.*|.copilot.|.chatgpt.|.gemini.$ (Image 3 below)
Može biti slika sljedećeg: tekst "x Create Createnewchannel new channel Channel Channelgroupdetails group details Channel name AI promet Channel conditions Add conditions to define your custom channel Match AT LEAST ONE rule in this group Source Conditions* + -Addconditiongroup Add condition group matches reAex ilot *chatgpt. wwoww *gemini. S wwW Cancel Apply"
Image 3: Creating a condition for the new channel named “AI traffic”
  1. Now save that channels definition

Reordering new channel definition in GA4

Google Analytcs 4 already filters some traffic coming from known social media referrals, by classifying that traffic as “Organic Social”, we should do something similar now. Since AI traffic actually is a “Referral” traffic, but we filtered out just a small portion of it, we should give our newly defined channel a higher priority over existing referral traffic. Here’s how to do that:

  1. move this new channel above Referral by clicking “Reorder” at the top of all channels.
    • Dots will appear next to the channel names; click and drag your new channel above “Referral” (Image 4)
Može biti slika sljedećeg: tekst
Image 4: Reordering traffic channels in Google Analytics 4 custom default channel grouping
  1. Click “Apply” at the top of the list.
  2. Save the group by selecting “Save Group” at the top of the page.

How to use these new channel grouping?

Since you now have two channel groupings, you can choose which one will be set as the default when you are viewing standard or Advertising reports. You’ll also always be able to choose between “Default channel grouping” or your newly created grouping in reports.

If you’ve set up the new channel grouping and have the paid version of Analytics, data might show up immediately. But these settings should soon be available for all properties and will also apply to historical data, letting you see how much AI has visited your site in the past!

How to view AI visits?

In order to see traffic from AI agents, go to “Leads > Traffic Acquisition” or “Acquisition > Traffic Acquisition” reports. Then, select your newly created channel grouping as a dimension (that left column next to “Sessions” if you missed this in training and can’t remember what’s a dimension and what’s a metric). Your results might look like the final image.

Može biti slika sljedećeg: telefon i tekst
Image 5: Channel “AI traffic” showing up as a dimension value in GA4 traffic reports

Happy analyzing! 😉