{"id":13073,"date":"2025-04-04T00:00:00","date_gmt":"2025-04-04T00:00:00","guid":{"rendered":"https:\/\/e-dialog.group\/blog\/exclude-bot-traffic-in-a-sensible-way\/"},"modified":"2026-02-26T13:38:32","modified_gmt":"2026-02-26T13:38:32","slug":"exclude-bot-traffic-in-a-sensible-way","status":"publish","type":"post","link":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/","title":{"rendered":"Exclude Bot Traffic In A Sensible Way"},"content":{"rendered":"<p>In our previous<a href=\"https:\/\/e-dialog.group\/blog\/digital-analytics\/bot-traffic-in-ga4\/\">Blog post &ldquo;Bot Traffic in GA4&rdquo;<\/a>explained how to identify bot traffic. The following article explains how to exclude previously identified bot traffic using Google Tag Manager (client-side and server-side).<\/p>\n<h2>Filter bot traffic in GA4<\/h2>\n<p>There is currently no automatic filter that can exclude bot traffic. For this reason, we need to create our own filter that excludes all traffic except the traffic we flag. How we mark traffic using Google Tag Manager and how the filter is created in GA4 is explained in the following instructions.<\/p>\n<p>There is currently no automatic way to completely exclude bot traffic in Google Analytics 4 (GA4). Therefore, it is necessary to create your own filter that only takes into account the desired traffic and excludes all other data from the reports. To implement this, the relevant traffic is first marked in the Google Tag Manager (GTM). The parameter &ldquo;traffic_type&rdquo; is very important here, as it is necessary for the GA4 filter. A suitable filter is then set up in GA4. The following steps explain in detail how to carry out this process.<\/p>\n<h2>Implementation with the client side GTM<\/h2>\n<p>Implementation in client side GTM is very simple and takes just a few steps. All traffic from the GTM is stored with any &ldquo;traffic_type&rdquo; and then permitted with a suitable GA4 filter.<\/p>\n<h3>Adjustment in GTM<\/h3>\n<p>First, the GA4 config tag in Google Tag Manager is expanded to include the &ldquo;traffic_type&rdquo; parameter. It is not relevant which value is entered.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type-1024x745.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type-1024x745.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type-300x218.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type-768x559.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type-1536x1118.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type.png 866w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type.png 863w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-traffic_type.png 1852w\" alt=\"Bot Traffic verhindern - Traffic Type\" width=\"800\" height=\"582\"><\/p>\n<h3>Adjustment in GA4<\/h3>\n<p>In the second step, a filter must be created in GA4 to determine which data should be collected. All other data is automatically excluded.<\/p>\n<p>To do this, the settings must be opened in GA4.<\/p>\n<p>Then under the property settings, under the sub-item &ldquo;Data collection and modification&rdquo;, click on the item &ldquo;Data filters&rdquo;.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters-1024x551.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters-1024x551.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters-300x161.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters-768x413.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters-1536x826.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters.png 1171w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters.png 1168w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-filters.png 1852w\" alt=\"Bot Traffic verhindern - GA4 Filters\" width=\"800\" height=\"430\">In this mask you now create a new filter with the filter type &ldquo;Internal Traffic&rdquo; and adjust the following details:<\/p>\n<ul>\n<li><strong>Name of the data filter<\/strong>: Include correctTraffic<\/li>\n<li><strong>Filtering process<\/strong>: Include only<\/li>\n<li><strong>traffic_type<\/strong>: correctTraffic &ndash;&gt; (the value that was previously stored in the GTM)<\/li>\n<li><strong>Filter status<\/strong>: Test<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-1024x649.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-1024x649.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-300x190.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-768x487.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-1536x974.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details-2048x1298.png 2048w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details.png 994w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-filter_details.png 991w\" alt=\"Bot Traffic verhindern - Filter Details\" width=\"800\" height=\"507\">Setting the filter status to &ldquo;Test&rdquo; is only a recommendation so that you can first test how much bot traffic is actually coming in.<br>\nThis will still capture the bot traffic in GA4, but will mark it as &ldquo;Include correctTraffic&rdquo;. This enables precise checking without the filter actively excluding data traffic.<\/p>\n<p>If all data arrives correctly and the reports have been sufficiently checked, the filter status can be set to &ldquo;active&rdquo;.<\/p>\n<h2>Implementation with the server side GTM<\/h2>\n<p>The more effective solution to avoid bot traffic is via server side GTM. The prerequisite for this is of course an existing setup.<\/p>\n<p>The principle works similarly to the first method: For every GA4 event, the &ldquo;traffic_type&rdquo; parameter is transmitted and set to &ldquo;correctTraffic&rdquo;.<\/p>\n<p>The difference: With server-side tracking, events that are recognized as spam are filtered out immediately before they are forwarded to GA4. This means that this data does not even reach Google Analytics. This saves the additional setup of the filter from the previously explained method.<\/p>\n<p>The following step by step instructions show how the implementation works in server side GTM.<\/p>\n<h3>Create variables<\/h3>\n<h4>Community Template Variable &ldquo;Simple Bot Detector&rdquo;<\/h4>\n<p>Markus B&auml;rsch&rsquo;s variable aims to identify known bots based on their user agent string.<\/p>\n<p>The variable contains an extensive list of user agent strings typically used by bots. If an incoming request has one of these strings in the user agent, it is classified as a bot.<\/p>\n<p>In addition, the variable searches for general terms such as &ldquo;bot&rdquo;, &ldquo;crawler&rdquo; or &ldquo;spider&rdquo; in the user agent. If it finds such terms, the traffic is classified as potentially suspicious.<\/p>\n<p>Users can also add their own strings to identify additional bots that are not included in the standard list.<\/p>\n<p>To use the template, proceed as follows:<\/p>\n<ol>\n<li>Open the area<strong>Templates<\/strong>in Google Tag Manager.<\/li>\n<li>Choose there<strong>Variable templates<\/strong>out of.<\/li>\n<li>Click on<strong>Search Gallery<\/strong>to open the template gallery.<\/li>\n<li>Search for &ldquo;<strong>Simple Bot Detector<\/strong>&ldquo;.<\/li>\n<li>Select the template and click<strong>Add to Workspace<\/strong>to add it to your workspace.<\/li>\n<li>Open the area<strong>variables<\/strong><\/li>\n<li>New variable and select the template as the variable type and give it a name (e.g.: Simple Bot Detector)<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot-1024x287.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot-1024x287.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot-300x84.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot-768x215.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot.png 1200w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-simple_bot.png 1258w\" alt=\"Bot Traffic verhindern - Simple Bot\" width=\"800\" height=\"224\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-1024x385.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-1024x385.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-300x113.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-768x288.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-1536x577.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot-2048x769.png 2048w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-variable_simple_bot.png 1200w\" alt=\"Bot Traffic verhindern - Variable Simple Bot\" width=\"800\" height=\"301\"><\/p>\n<h4>Community Template Variable &ldquo;Advanced Lookup Table&rdquo;<\/h4>\n<p>stape.io&rsquo;s variable enables a more flexible and powerful implementation of lookup tables that can work with more complex conditions and dynamic data. This function is often used to assign values &#8203;&#8203;based on multiple input criteria or to make decisions before sending data to GA4.<\/p>\n<p>The procedure is similar to the previous variable, but creating the variable is a little more complex. To do this, proceed as follows:<\/p>\n<ol>\n<li>Open the area<strong>Templates<\/strong>in Google Tag Manager.<\/li>\n<li>Choose there<strong>Variable templates<\/strong>out of.<\/li>\n<li>Click on<strong>Search Gallery<\/strong>to open the template gallery.<\/li>\n<li>Search for &ldquo;<strong>Advanced Lookup Table<\/strong>&ldquo;.<\/li>\n<li>Select the template and click Add to Workspace to add it to your workspace.<\/li>\n<li>Open the area<strong>variables<\/strong><\/li>\n<li>New variable and select the template &ldquo;Advanced Lookup Table&rdquo; as the variable type and give it a name<\/li>\n<li>Now you have the option to set different conditions and thereby mark the traffic. The most important condition is to mark the correct traffic and declare the rest as spam.\n<ol>\n<li>If variable &ldquo;{{Simple Bot Detector}}&rdquo; equals &ldquo;OK&rdquo; return &ldquo;correctTraffic&rdquo;<\/li>\n<li>Set default value &ldquo;spam&rdquo;<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table-1024x218.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table-1024x218.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table-300x64.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table-768x163.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table.png 1200w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-template_advanced_table.png 1242w\" alt=\"Bot Traffic verhindern - Template Advanced Table\" width=\"800\" height=\"170\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-1024x469.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-1024x469.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-300x137.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-768x352.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-1536x704.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table-2048x938.png 2048w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-lookup_table.png 1200w\" alt=\"Bot Traffic verhindern - Lookup Tabelle\" width=\"800\" height=\"366\"><\/p>\n<h4>Customization of triggers<\/h4>\n<p>To prevent spam traffic from ending up in GA4, an &ldquo;exception&rdquo; trigger must be added to the GA4 tags. The trigger contains the following settings:<\/p>\n<ul>\n<li><strong>name<\/strong>: Exclude bot traffic<\/li>\n<li><strong>type<\/strong>: Custom event<\/li>\n<li><strong>Event name<\/strong>: .*&nbsp; (Use regex matching)<\/li>\n<li><strong>Condition<\/strong>: &ldquo;ltb &ndash; traffic type&rdquo; equals spam<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-1024x386.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-1024x386.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-300x113.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-768x289.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-1536x579.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger-2048x772.png 2048w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-trigger.png 1200w\" alt=\"Bot Traffic verhindern - Trigger\" width=\"800\" height=\"302\"><\/p>\n<h4>Customization GA4 tags<\/h4>\n<p>In order for spam traffic to be blocked, the previously created trigger must be added to all GA4 tags.<\/p>\n<p>Additionally, the &ldquo;traffic-type&rdquo; parameter is added with the value of the previously created variable. This value serves as an additional control and could be used as an additional filtering option in GA4.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-1024x646.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-1024x646.png 1024w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-300x189.png 300w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-768x484.png 768w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-1536x969.png 1536w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside-2048x1292.png 2048w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside.png 999w, https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/bot-traffic-verhindern-ga4-tag-serverside.png 996w\" alt=\"Bot Traffic verhindern - GA4 Tag Serverside\" width=\"800\" height=\"505\">The setup is now fully set up and ready to be published.<\/p>\n<p>In the coming weeks, GA4 should be carefully monitored in order to identify possible errors in the setup at an early stage and make adjustments if necessary.<\/p>\n<p>In the best case scenario, no more bot traffic should end up in GA4.<\/p>\n<h2>Conclusion<\/h2>\n<p>In Google Analytics 4 (GA4) there is no automatic way to exclude bot traffic. Using Google Tag Manager (GTM), traffic can be tagged by adding the &ldquo;traffic_type&rdquo; parameter. This can be done via clientside GTM or, more efficiently, via serverside GTM, where spam events are blocked directly. Once established, the setup should be tested and monitored to ensure data quality.<\/p>\n<h3>Interest? Contact us:<a href=\"mailto:kontakt@e-dialog.group\">kontakt@e-dialog.group<\/a><\/h3>\n<p>All graphics &ndash; Source: e-dialog<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.<\/p>\n","protected":false},"author":1,"featured_media":4804,"comment_status":"closed","ping_status":"open","sticky":false,"template":"post-old.php","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5,445],"channel":[],"goal":[463],"technology":[36,38],"c-year":[7],"class_list":{"0":"post-13073","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-analytics","9":"goal-digital-strategy","10":"technology-google-analytics","11":"technology-google-tag-manager","12":"c-year-7"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Exclude Bot Traffic In A Sensible Way - e-dialog<\/title>\n<meta name=\"description\" content=\"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exclude Bot Traffic In A Sensible Way\" \/>\n<meta property=\"og:description\" content=\"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/\" \/>\n<meta property=\"og:site_name\" content=\"e-dialog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/edialog.group\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-04T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T13:38:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2200\" \/>\n\t<meta property=\"og:image:height\" content=\"1180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"digitalists\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"digitalists\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/\"},\"author\":{\"name\":\"digitalists\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/person\\\/7b481e2ac90c21e4dc393821d35bb518\"},\"headline\":\"Exclude Bot Traffic In A Sensible Way\",\"datePublished\":\"2025-04-04T00:00:00+00:00\",\"dateModified\":\"2026-02-26T13:38:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/\"},\"wordCount\":1105,\"publisher\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"articleSection\":[\"Analytics\",\"Analytics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/\",\"name\":\"Exclude Bot Traffic In A Sensible Way - e-dialog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"datePublished\":\"2025-04-04T00:00:00+00:00\",\"dateModified\":\"2026-02-26T13:38:32+00:00\",\"description\":\"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#primaryimage\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"contentUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/cookie-banner-ch.png\",\"width\":2200,\"height\":1180,\"caption\":\"|\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/exclude-bot-traffic-in-a-sensible-way\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exclude Bot Traffic In A Sensible Way\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\",\"name\":\"e-dialog\",\"description\":\"Data-driven Marketing &amp; Strategie\",\"publisher\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#organization\",\"name\":\"e-dialog\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/e-dialog-logo.svg\",\"contentUrl\":\"https:\\\/\\\/e-dialog.group\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/e-dialog-logo.svg\",\"width\":1,\"height\":1,\"caption\":\"e-dialog\"},\"image\":{\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/edialog.group\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/e-dialog-gmbh\\\/\",\"https:\\\/\\\/www.instagram.com\\\/e_dialog\\\/\",\"https:\\\/\\\/www.tiktok.com\\\/@e_dialog\"],\"description\":\"Bei e-dialog gestalteten wir gemeinsam die Zukunft des data-driven Marketings - mit einem gro\u00dfartigen Team aus passionierten Expert*innen.\",\"email\":\"kontakt@e-dialog.group\",\"telephone\":\"+43 1 309 09 09\",\"legalName\":\"e-dialog GmbH\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/#\\\/schema\\\/person\\\/7b481e2ac90c21e4dc393821d35bb518\",\"name\":\"digitalists\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g\",\"caption\":\"digitalists\"},\"sameAs\":[\"https:\\\/\\\/e-dialog.group\"],\"url\":\"https:\\\/\\\/e-dialog.group\\\/en\\\/blog\\\/author\\\/digitalists\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Exclude Bot Traffic In A Sensible Way - e-dialog","description":"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/","og_locale":"en_US","og_type":"article","og_title":"Exclude Bot Traffic In A Sensible Way","og_description":"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.","og_url":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/","og_site_name":"e-dialog","article_publisher":"https:\/\/www.facebook.com\/edialog.group","article_published_time":"2025-04-04T00:00:00+00:00","article_modified_time":"2026-02-26T13:38:32+00:00","og_image":[{"width":2200,"height":1180,"url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","type":"image\/png"}],"author":"digitalists","twitter_card":"summary_large_image","twitter_misc":{"Written by":"digitalists","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#article","isPartOf":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/"},"author":{"name":"digitalists","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/person\/7b481e2ac90c21e4dc393821d35bb518"},"headline":"Exclude Bot Traffic In A Sensible Way","datePublished":"2025-04-04T00:00:00+00:00","dateModified":"2026-02-26T13:38:32+00:00","mainEntityOfPage":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/"},"wordCount":1105,"publisher":{"@id":"https:\/\/e-dialog.group\/en\/#organization"},"image":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#primaryimage"},"thumbnailUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","articleSection":["Analytics","Analytics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/","url":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/","name":"Exclude Bot Traffic In A Sensible Way - e-dialog","isPartOf":{"@id":"https:\/\/e-dialog.group\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#primaryimage"},"image":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#primaryimage"},"thumbnailUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","datePublished":"2025-04-04T00:00:00+00:00","dateModified":"2026-02-26T13:38:32+00:00","description":"Unwanted bot traffic in GA4 distorts data. This article explains filtering with Google Tag Manager (GTM). Since GA4 does not provide automatic bot detection, two methods are presented: client-side marking and more efficient server-side filtering. The article shows how traffic is flagged in GTM and filtered in GA4 or how intelligent GTM templates block bots on the server side before they reach the analytics. Detailed instructions help ensure the quality of GA4 data for more informed decisions. The setup should be tested and monitored for optimal results.","breadcrumb":{"@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#primaryimage","url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","contentUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/08\/cookie-banner-ch.png","width":2200,"height":1180,"caption":"|"},{"@type":"BreadcrumbList","@id":"https:\/\/e-dialog.group\/en\/blog\/exclude-bot-traffic-in-a-sensible-way\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/e-dialog.group\/en\/"},{"@type":"ListItem","position":2,"name":"Exclude Bot Traffic In A Sensible Way"}]},{"@type":"WebSite","@id":"https:\/\/e-dialog.group\/en\/#website","url":"https:\/\/e-dialog.group\/en\/","name":"e-dialog","description":"Data-driven Marketing &amp; Strategie","publisher":{"@id":"https:\/\/e-dialog.group\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/e-dialog.group\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/e-dialog.group\/en\/#organization","name":"e-dialog","url":"https:\/\/e-dialog.group\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/logo\/image\/","url":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/06\/e-dialog-logo.svg","contentUrl":"https:\/\/e-dialog.group\/wp-content\/uploads\/2025\/06\/e-dialog-logo.svg","width":1,"height":1,"caption":"e-dialog"},"image":{"@id":"https:\/\/e-dialog.group\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/edialog.group","https:\/\/www.linkedin.com\/company\/e-dialog-gmbh\/","https:\/\/www.instagram.com\/e_dialog\/","https:\/\/www.tiktok.com\/@e_dialog"],"description":"Bei e-dialog gestalteten wir gemeinsam die Zukunft des data-driven Marketings - mit einem gro\u00dfartigen Team aus passionierten Expert*innen.","email":"kontakt@e-dialog.group","telephone":"+43 1 309 09 09","legalName":"e-dialog GmbH"},{"@type":"Person","@id":"https:\/\/e-dialog.group\/en\/#\/schema\/person\/7b481e2ac90c21e4dc393821d35bb518","name":"digitalists","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8acd1abfb5ef9f78793e3164334d4533968653b26cbd89b6cf0eb4e5483434e4?s=96&d=mm&r=g","caption":"digitalists"},"sameAs":["https:\/\/e-dialog.group"],"url":"https:\/\/e-dialog.group\/en\/blog\/author\/digitalists\/"}]}},"_links":{"self":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/13073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/comments?post=13073"}],"version-history":[{"count":1,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/13073\/revisions"}],"predecessor-version":[{"id":13518,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/posts\/13073\/revisions\/13518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/media\/4804"}],"wp:attachment":[{"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/media?parent=13073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/categories?post=13073"},{"taxonomy":"channel","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/channel?post=13073"},{"taxonomy":"goal","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/goal?post=13073"},{"taxonomy":"technology","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/technology?post=13073"},{"taxonomy":"c-year","embeddable":true,"href":"https:\/\/e-dialog.group\/en\/wp-json\/wp\/v2\/c-year?post=13073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}