{"id":438,"date":"2025-10-16T16:36:37","date_gmt":"2025-10-16T14:36:37","guid":{"rendered":"https:\/\/www.sabatka.net\/cs\/?p=438"},"modified":"2025-10-28T10:56:22","modified_gmt":"2025-10-28T08:56:22","slug":"5-most-common-bugs-in-cookie-bar-configuration","status":"publish","type":"post","link":"https:\/\/www.sabatka.net\/en\/5-most-common-bugs-in-cookie-bar-configuration\/","title":{"rendered":"The 5 most common mistakes in cookie bar settings"},"content":{"rendered":"\n<p>One of the most complicated aspects of setting up website analytics is integrating a cookie bar. I&#8217;m not referring to legal requirements, but rather technical accuracy. It seems so simple, yet it&#8217;s not.<\/p>\n\n\n\n<p>Recently, I&#8217;ve come across recurring errors in settings. Below, I&#8217;ll describe these errors and how to identify them on a website.<\/p>\n\n\n\n<p>I will not discuss the legal aspects or wording. I will focus on errors that affect the quality of measured data in GA4 or marketing tools.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">1. the bar does nothing<\/h2>\n\n\n\n<p>The manager ordered the cookie bar to be implemented. And the programmer implemented it. Both then checked that the bar was displayed and happily closed the task. However, no one thought to change the execution of analytical, marketing, or other codes.<\/p>\n\n\n\n<p>The bar is only displayed; the measurement codes continue to run happily. Even without consent. We have all the data, but it violates the law.<\/p>\n\n\n\n<p><strong>How to tell if the cookie bar is not working<\/strong><\/p>\n\n\n\n<p>The easiest way is to open the developer tools and find the &#8220;Cookies&#8221; item in the &#8220;Applications&#8221; tab. After loading the page, the cookie list must be either completely empty or contain only technically necessary cookies (you will probably need a programmer to assess this).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"596\" data-src=\"https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools-1024x596.png\" alt=\"\" class=\"wp-image-446 lazyload\" data-srcset=\"https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools-1024x596.png 1024w, https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools-300x175.png 300w, https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools-768x447.png 768w, https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools-1536x894.png 1536w, https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/cookies-in-developer-tools.png 1914w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/596;\" \/><\/figure>\n\n\n\n<p>If you are inserting measurement codes directly into the HTML of your website, tell your programmer.<\/p>\n\n\n\n<p>If you use Google Tag Manager for management, study &#8220;Consent Mode&#8221; or find an analyst.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">2. codes do not run after consent is given<\/h2>\n\n\n\n<p>Once you get consent, you need to run the tracking codes. Not on the next page. Right away.<\/p>\n\n\n\n<p>If you run them on the second page, you&#8217;ll lose all the data about the source of the visit. UTM parameters, document.referrer, gclid, everything. Visits then appear as direct (e.g., direct entry into the browser). Marketing then has nothing to evaluate campaigns based on.<\/p>\n\n\n\n<p>In GTM, tags with built-in consent are usually fine, as they ensure that data is sent after consent is given.<\/p>\n\n\n\n<p>However, tags with &#8220;additional consent&#8221; tend to be problematic \u2013 in this case, you must ensure that they are run after consent is given.<\/p>\n\n\n\n<p><strong>How to tell that codes are not running after consent has been given<\/strong><\/p>\n\n\n\n<p>Check that the codes are executed after consent is given. Chrome extensions such as <a href=\"https:\/\/chromewebstore.google.com\/detail\/ghostery-tracker-ad-block\/mlomiejdfkolichcflejclcbmpeaniij?hl=en\" target=\"_blank\" rel=\"noopener\">Ghostery<\/a>, or platform-specific extensions such as <a href=\"https:\/\/chromewebstore.google.com\/detail\/meta-pixel-helper\/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en\" target=\"_blank\" rel=\"noopener\">Meta Pixel Helper<\/a>, <a href=\"https:\/\/chromewebstore.google.com\/detail\/uet-tag-helper-by-microso\/naijndjklgmffmpembnkfbcjbognokbf?hl=en\" target=\"_blank\" rel=\"noopener\">UET Tag Helper<\/a>, etc., can help you with this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"606\" height=\"276\" data-src=\"https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/meta-pixel-helper.png\" alt=\"\" class=\"wp-image-447 lazyload\" data-srcset=\"https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/meta-pixel-helper.png 606w, https:\/\/www.sabatka.net\/wp-content\/uploads\/2025\/10\/meta-pixel-helper-300x137.png 300w\" data-sizes=\"(max-width: 606px) 100vw, 606px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 606px; --smush-placeholder-aspect-ratio: 606\/276;\" \/><\/figure>\n\n\n\n<p>If you are more technically savvy, you can look in the Developer Tools under the Network tab\u2014here you should see the requests that send the tracking codes.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">3. page reload<\/h2>\n\n\n\n<p>If cookies, toolbars, and marketing codes are managed by a programmer, they sometimes simplify their work. And when they get consent, instead of running complicated marketing codes, they simply refresh the page\u2014similar to pressing F5. Only then are the marketing codes run and the data sent. Unfortunately, not all of it\u2014when you reload, you lose the &#8220;document.referrer&#8221; value. This is exactly the value that allows Google Analytics to recognize whether you are coming from another website or, for example, from a search engine. So most visits from referring websites or searches will then fall into the &#8220;direct&#8221; category. And you definitely don&#8217;t want that!<\/p>\n\n\n\n<p>Once you get consent, you need to make sure the tracking codes are activated. Right away. On the same page. If you don&#8217;t start tracking right away, you&#8217;ll lose essential data for evaluating your marketing.<\/p>\n\n\n\n<p><strong>How to recognize when measurement starts after reloading<\/strong><\/p>\n\n\n\n<p>Typically, you will see a very high percentage of direct visits in Google Analytics, easily 70% or more. There is also a significant discrepancy between the data from Google Search Console and Google Analytics.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">4. you don&#8217;t know the opt-in rate and consent rate<\/h2>\n\n\n\n<p>Due to consent, you will not be able to measure some of the data. If you want to evaluate the data, you need to know how much is missing. And it could be anywhere between 20 and 80%\u2014depending on how compliant your cookie solution is with all regulations.<\/p>\n\n\n\n<p>You will be interested in two metrics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Opt-in rate &#8211; which indicates what percentage of people give you consent. If you don&#8217;t know <a href=\"https:\/\/www.sabatka.net\/en\/what-is-opt-in-rate\/\">how to calculate the opt-in rate<\/a>, read the linked article.<\/li>\n\n\n\n<li>Consent rate &#8211; the proportion of data you have measured with consent. If you send GA4 anonymous pings and store data in BigQuery, you can easily obtain the metric from BigQuery.<\/li>\n<\/ul>\n\n\n\n<p>If you have data modeling enabled in GA4, the values displayed may be close to reality. However, it is still necessary to evaluate the accuracy of the measurements.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">5. inappropriately selected Wait for timeout<\/h2>\n\n\n\n<p>Wait for timeout is a mysterious parameter set by some cookie bars. It affects the behavior of Google tags, i.e., GA4 or Google Ads. It tells scripts to wait a while before sending a hit\u2014that consent will come. This setting is necessary if you use asynchronously loaded consents.<\/p>\n\n\n\n<p>The problem is that Google Tags wait for the set time, whether you have consent or not. If you have wait for timeout set on your transaction measurement page, you can easily lose tens of percent of measured transactions.<\/p>\n\n\n\n<p><strong>How to tell if your wait for timeout is set incorrectly<\/strong><\/p>\n\n\n\n<p>Compare the data share in GA4 (or ideally in BigQuery) with reality. If there is a significant discrepancy (after taking into account the consent rate), this may be the cause.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Legal requirements<\/strong><\/h2>\n\n\n\n<p>If everything is technically in order, you can check whether the bar is also legally compliant. The Office for Personal Data Protection recently published an article summarizing the most common shortcomings of cookie bars.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/uoou.gov.cz\/cs\/cookies-listy-vykazuji-radu-nedostatku\" target=\"_blank\" rel=\"noopener\">The most common mistakes in cookie bar settings<\/a><\/div>\n<\/div>\n\n\n\n<p>When checking the cookie bar, I recommend going through all the observations of the \u00daOO\u00da in addition to the points above.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Not sure if everything is in order?<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.sabatka.net\/en\/kontakt\/\">Write to me<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most complicated aspects of setting up website analytics is integrating a cookie bar. I&#8217;m not referring to legal requirements, but rather technical accuracy. It seems so simple, yet it&#8217;s not. Recently, I&#8217;ve come across recurring errors in settings. Below, I&#8217;ll describe these errors and how to identify them on a website. I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":443,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,8,10],"tags":[],"class_list":["post-438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cookie-lista","category-gdpr","category-gtm"],"_links":{"self":[{"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/posts\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":13,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/posts\/438\/revisions\/516"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/media\/443"}],"wp:attachment":[{"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/media?parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/categories?post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sabatka.net\/en\/wp-json\/wp\/v2\/tags?post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}