{"id":15758,"date":"2025-04-08T09:14:55","date_gmt":"2025-04-08T08:14:55","guid":{"rendered":"https:\/\/www.20i.com\/blog\/?p=15758"},"modified":"2026-02-20T09:40:37","modified_gmt":"2026-02-20T09:40:37","slug":"how-to-track-ai-traffic-in-ga4","status":"publish","type":"post","link":"https:\/\/www.20i.com\/blog\/how-to-track-ai-traffic-in-ga4\/","title":{"rendered":"How to Track AI Traffic in GA4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AI powered search and chatbot tools are becoming a significant part of how users find and engage with websites. A <a href=\"https:\/\/www.highervisibility.com\/seo\/learn\/how-people-search\/\" target=\"_blank\" rel=\"noreferrer noopener\">study by Higher Visibility<\/a> showed that 71% of Americans now use AI tools for searching.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many marketers are now considering how LLM\u2019s (Large Language Models) will crawl their website, alongside the more traditional search engine bots.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Traffic from these sources such as ChatGPT, Claude and Perplexity can be tracked in Google Analytics 4 (GA4) \u201cReferrals\u201d alongside other traffic.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, visits from AI tools are relatively unique. AI platforms crawl, interpret and present your content in a different way to traditional search engines.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The queries searched within AI tools are often different too, taking a more informational or conversational approach. As such it can be much more useful to use a tailored approach to tracking this traffic,&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide will walk you through configuring GA4 to consolidate AI referrals, making tracking and analysis much easier.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Setting Up an AI Referral Exploration in GA4<\/strong>&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">GA4\u2019s standard reports don\u2019t specifically categorise traffic from AI chatbots, so you\u2019ll need to make a few changes if you want to track this data in its own area. The way I like to do this is within GA4\u2019s explorations section.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get started, <a href=\"https:\/\/analytics.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">log into your GA4 property<\/a> and in the left-hand navigation menu, click on <strong>Explore<\/strong>. From here, you can create<strong> a new exploration<\/strong>.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1168\" height=\"350\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-explorations-menu.png\" alt=\"GA4 explorations menu\" class=\"wp-image-15759\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-explorations-menu.png 1168w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-300x90.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-768x230.png.webp 768w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-370x111.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-270x81.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-570x171.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-740x222.png.webp 740w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-explorations-menu-150x45.png.webp 150w\" sizes=\"auto, (max-width: 1168px) 100vw, 1168px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There are a number of different template options for explorations, but a blank exploration will work for tracking AI referrals.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within the exploration, begin by giving it a name such as \u201cAI referrals\u201d that will make it easily identifiable.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, you need to configure the variables.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the left hand \u201cVariables\u201d column, press the + button next to \u201cDimensions\u201d, then select the following options:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Page referrer<\/strong> \u2013 The URL of the referring website&nbsp;<\/li>\n\n\n\n<li><strong>Landing page + query string \u2013 <\/strong>The page on your website the referral landed on&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We also use a &#8220;Hostname&#8221; dimension to separate our different subdomains.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the \u201cMetrics\u201d section below, click the + icon again, and this time select \u201cSessions\u201d, which will show you the number of website visitor sessions driven by each dimension.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"264\" height=\"549\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-variables-menu.png\" alt=\"ga4 variables menu\" class=\"wp-image-15760\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-variables-menu.png 264w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-variables-menu-144x300.png.webp 144w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-variables-menu-150x312.png.webp 150w\" sizes=\"auto, (max-width: 264px) 100vw, 264px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your business and the goals that you have, you may also want to add additional dimensions or metrics such as:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Engagement rate<\/strong> \u2013 To find how visitors are engaging with the page&nbsp;<\/li>\n\n\n\n<li><strong>Events<\/strong> \u2013 To track how many conversions or \u201ckey events\u201d are coming from AI traffic&nbsp;<\/li>\n\n\n\n<li><strong>Date + time<\/strong> \u2013 What times of the week drive the most AI referrals&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have selected the data you wish to include in your exploration, either double click on each variable&#8217;s name, or drag them into the free form section on the right.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will create a table with your chosen data points, however at the moment it will be showing all referrals, similar to what you can see in a regular GA4 report.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"452\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-referral-sources.png\" alt=\"ga4 referrals list\" class=\"wp-image-15761\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-referral-sources.png 661w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-referral-sources-300x205.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-referral-sources-370x253.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-referral-sources-270x185.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-referral-sources-570x390.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-referral-sources-150x103.png.webp 150w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Identify AI Chatbot Referrals<\/strong>&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To drill down to referrals from AI chatbots, you\u2019ll need to use the filter function within your exploration.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explorations allow you to set up to 10 individual filters. Due to the vast number of AI products that may send referrals, the best option is to use a Regex and set a \u201ccatch all\u201d filter.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click the + on filters, and select \u201cPage Referrer\u201d, then select \u201cMatches regex\u201d and enter the following&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>^https:\\\/\\\/(www\\.meta\\.ai|www\\.perplexity\\.ai|chat\\.openai\\.com|claude\\.ai|chat\\.mistral\\.ai|gemini\\.google\\.com|bard\\.google\\.com|chatgpt\\.com|copilot\\.microsoft\\.com)(\\\/.*)?$<\/em>\u00a0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will pick up referrals from most of the major sources, including ChatGPT, Claude, Google Gemini and Bing CoPilot. This is a list that will evolve and can be updated as the most popular sources change.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"274\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ai-referrals-ga4.png\" alt=\"ai referrals in ga4\" class=\"wp-image-15762\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ai-referrals-ga4.png 501w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ai-referrals-ga4-300x164.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ai-referrals-ga4-370x202.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ai-referrals-ga4-270x148.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ai-referrals-ga4-150x82.png.webp 150w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Further Segments<\/strong>&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you\u2019d like to drill down into your AI referrals further, you can also use the \u201cSegments\u201d setting.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Clicking the + button on this option will allow you to segment your data along lines such as Mobile only traffic, Desktop only traffic, or traffic from users who have previously visited your website.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The \u201cCreate new segment\u201d option will allow you to take this even further, creating your own custom segments to help dig deeper into demographic information and much more<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1518\" height=\"543\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-add-new-segment.png\" alt=\"Ga4 add new segment menu\" class=\"wp-image-15763\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-add-new-segment.png 1518w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-300x107.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-768x275.png.webp 768w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-370x132.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-270x97.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-570x204.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-740x265.png.webp 740w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-add-new-segment-150x54.png.webp 150w\" sizes=\"auto, (max-width: 1518px) 100vw, 1518px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"259\" height=\"591\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-mobile-traffic-segment.png\" alt=\"ga4 mobile traffic segment\" class=\"wp-image-15764\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-mobile-traffic-segment.png 259w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-mobile-traffic-segment-131x300.png.webp 131w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-mobile-traffic-segment-150x342.png.webp 150w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Add Visualizations<\/strong>&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the type of data you\u2019re looking for, you may want it represented in a different way \u2013 this is where \u201cvisualizations\u201d play a part.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within the \u201cSettings\u201d section of your exploration, you will see the \u201cVisualization\u201d bar, which allows you to change the formatting of your data with one click.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"238\" height=\"155\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-visualization-options.png\" alt=\"ga4 exploration visualization options\" class=\"wp-image-15765\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-visualization-options.png 238w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-visualization-options-150x98.png.webp 150w\" sizes=\"auto, (max-width: 238px) 100vw, 238px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When I\u2019m looking to find out exactly which pages are drawing the most traffic, then the standard table visualization is best. For a closer look at which sources are providing the most visits, the donut chart can be very effective.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1238\" height=\"696\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-donut-chart.png\" alt=\"GA4 exploration donut chart\" class=\"wp-image-15766\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-donut-chart.png 1238w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-300x169.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-768x432.png.webp 768w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-370x208.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-270x152.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-570x320.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-740x416.png.webp 740w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-donut-chart-150x84.png.webp 150w\" sizes=\"auto, (max-width: 1238px) 100vw, 1238px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Meanwhile the line graph can be a really effective way of tracking the growth, or decline, of this traffic source over time.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1203\" height=\"685\" src=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-line-graph.png\" alt=\"Line graph exploration in ga4\" class=\"wp-image-15767\" style=\"border: 2px solid #EBEBEB\" srcset=\"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/ga4-exploration-line-graph.png 1203w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-300x171.png.webp 300w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-768x437.png.webp 768w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-370x211.png.webp 370w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-270x154.png.webp 270w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-570x325.png.webp 570w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-740x421.png.webp 740w, https:\/\/www.20i.com\/blog\/wp-content\/smush-webp\/2025\/04\/ga4-exploration-line-graph-150x85.png.webp 150w\" sizes=\"auto, (max-width: 1203px) 100vw, 1203px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why AI Traffic Tracking Matters<\/strong>&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By setting up AI referral tracking in GA4, you\u2019ll gain better insights into this growing source of website traffic.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whilst for many AI referrals are still a very small part of overall traffic, keeping track of chatbot referrals ensures you\u2019re not missing key trends in user behaviour.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you see that traffic from these sources is becoming particularly valuable to you, then you can use this information to further refine and tailor your content strategy.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Concerned about how AI is using your content? Learn <a href=\"https:\/\/www.20i.com\/blog\/how-to-prevent-ai-from-scraping-your-website\/\" target=\"_blank\" rel=\"noreferrer noopener\">how to prevent AI from scraping your website<\/a>.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"AI powered search and chatbot tools are becoming a significant part of how users find and engage with&hellip;","protected":false},"author":33,"featured_media":15788,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ub_ctt_via":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[49,292],"tags":[],"class_list":["post-15758","post","type-post","status-publish","format-standard","has-post-thumbnail","category-business-tips","category-seo-digital-strategy","cs-entry"],"featured_image_src":"https:\/\/www.20i.com\/blog\/wp-content\/uploads\/2025\/04\/Track-AI-Traffic-GA4_blog.png","author_info":{"display_name":"Danny Watkinson","author_link":"https:\/\/www.20i.com\/blog\/author\/dan-watkinson\/"},"_links":{"self":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/15758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/comments?post=15758"}],"version-history":[{"count":16,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/15758\/revisions"}],"predecessor-version":[{"id":18161,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/posts\/15758\/revisions\/18161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media\/15788"}],"wp:attachment":[{"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/media?parent=15758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/categories?post=15758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.20i.com\/blog\/wp-json\/wp\/v2\/tags?post=15758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}