AI apps

How to track AI traffic in Google Analytics 4

The days of relying solely on Google as a source of information are coming to an end. Previously, users would type their search query into Google, click a link from the top results and land on your website.

Nowadays, more people are turning to AI (artificial intelligence) chatbots such as ChatGPT, Gemini or Perplexity to find the information they’re looking for. This can have a significant impact on the levels of traffic a website may receive.

Have you ever wondered how much of your website traffic actually comes from these AI tools? There’s an easy way to find out!

Create a Custom Channel Group

To track AI traffic in Google Analytics 4 (GA4), first, you need to set up a Custom Channel Group.

This categorises AI traffic into its own group, similar to Organic Search traffic or Direct traffic, making it easy to visualise in GA4 reports.

You can do this by navigating to Admin in the bottom left-hand corner of your GA4 dashboard.

From here, select ‘Channel groups’ under the ‘Data display’ heading.

The channel group named ‘Default Channel Group’ will be displayed by default. Click the three-dot menu next to it and select ‘Copy to create new’.

Rename your new channel group to something memorable. For example, [Insert Website Name] Channel Group.

Click the blue ‘Add new channel’ button. A dialog box will open. Enter the channel name ‘AI Traffic’.

In channel conditions, select ‘Source’ from the dropdown menu. Next, click ‘Add a condition’, and select ‘Matches regex’ from the dropdown.

In the empty field below, copy and paste the following regex.

.*chatgpt\.com.*|.*perplexity.*|.*gemini\.google\.com.*|.*copilot\.microsoft\.com.*|.*copilot\.cloud\.microsoft.*|.*openai\.com.*|.*claude\.ai.*|.*writesonic\.com.*|.*copy\.ai.*|.*deepseek\.com.*|.*huggingface\.co.*|.*bard\.google\.com.*|.*grok\.microsoft\.com.*

This will group traffic from these different sources and display in GA4 reports as ‘AI Traffic’.

Click ‘Apply’ and then ‘Save channel’. You will then be taken back to the Channel list. Here, select ‘Reorder’ and drag and drop your new ‘AI Traffic’ channel above the existing ‘Referral’ channel.

This step is important because GA4 assigns traffic to channels based on the first matching rule it finds in the channel group hierarchy. If ‘Referral’ is listed above ‘AI Traffic’, any AI-driven visits that are essentially referred to the site may be attributed to Referral traffic first.

Once reordered, click ‘Save Group’. Your custom channel group is now ready to attribute AI traffic correctly.

To view the results, navigate to the User Acquisition report under ‘Acquisition’. By default, the report will show ‘First user primary channel group (default channel group)’ as the channel group.

Click the dropdown and select your new custom channel group from the list. This will be the name you gave it when following the steps above.

If your site has received AI traffic during the selected time, these visits will now appear in the report under AI Traffic.

Curious to know how you can improve your AI SEO (search engine optimisation)? Get in touch with the team at Engage Web today.

Lizi MacGregor
Latest posts by Lizi MacGregor (see all)

Get in touch

Acceptance

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

>