{"id":1030,"date":"2022-01-17T12:58:00","date_gmt":"2022-01-17T12:58:00","guid":{"rendered":"https:\/\/www.cookiebot.com\/en\/?p=1030"},"modified":"2026-03-12T08:19:23","modified_gmt":"2026-03-12T08:19:23","slug":"cookie-scripts","status":"publish","type":"post","link":"https:\/\/www.cookiebot.com\/us\/cookie-scripts\/","title":{"rendered":"Cookie Scripts"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-what-is-a-cookie-script\">What is a cookie script?<\/h2>\n\n\n\n<p>For those of us somewhat new or alien to the developer\u2019s world, the term script simply refers to the \u201cscripting language\u201d that a developer writes in when they code a website or an app or what have you.<\/p>\n\n\n\n<p>It\u2019s a string of text, a coding language that commands functions and executes tasks.<\/p>\n\n\n\n<p>In the case of a cookie script, we\u2019re talking about a piece of code that is inserted into the website\u2019s coding to specifically deal with cookies and online tracking present and operating on that site.<\/p>\n\n\n\n<p>A cookie is a file that is placed on your users\u2019 devices when they visit your website. There are different cookies, some are necessary, meaning they are first-party cookies essential for the website to function. These are not privacy intrusive.<\/p>\n\n\n\n<p>Others are marketing cookies or analytic cookies; third-party cookies that gather and share user data and sometimes sensitive, personal information with other companies. In fact, a billion-dollar industry has evolved around this gathering and sharing (i.e. selling) of personal information. We will have a comprehensive look at this later.<\/p>\n\n\n\n<p><a href=\"\/en\/cookie-checker\/\">Read more about cookies here.<\/a><\/p>\n\n\n\n<p>Cookie scripts are at the core of the <a href=\"\/\">Cookiebot consent management platform (CMP)<\/a>&nbsp;technology.<\/p>\n\n\n\n<p>The Cookiebot CMP scanner detects all of the tracking on your website, then automatically controls it until your users have given their prior consent (required by the GDPR in EU) or features a Do Not Sell My Personal Information link (required by the CCPA in California).<\/p>\n\n\n\n<p>In doubt whether your website is GDPR compliant? <a href=\"\/\">Test with the free Cookiebot CMP compliance test<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/admin.cookiebot.com\/signup\">Try Cookiebot CMP free for 14 days<\/a>... or forever if you have a small website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-gdpr-ccpa-and-cookie-scripts\">GDPR, CCPA and cookie scripts<\/h3>\n\n\n\n<p>In 2018, the EU passed a law called the GDPR \u2013 <a href=\"\/en\/gdpr\/\">General Data Protection Regulation<\/a>&nbsp;\u2013 which <strong>requires website operators to obtain the prior consent of a user before activating cookies and tracking on their website.<\/strong><\/p>\n\n\n\n<p>To live up to the GDPR as a website operator, you are required to not only know what cookies exists on your domain, you must also be able to control them.<\/p>\n\n\n\n<p>Even if your website isn\u2019t from the EU, <strong>you still have to comply with the GDPR<\/strong>&nbsp;if you have just one visitor from Europe. The GDPR protects all EU citizens and its jurisdiction is global.<\/p>\n\n\n\n<p><a href=\"\/en\/gdpr\/\">Read more about the GDPR here.<\/a><\/p>\n\n\n\n<p>On January 1, 2020, California Consumer Privacy Act (CCPA) took effect, regulating how businesses are allowed to collect and sell the personal information of California residents.<\/p>\n\n\n\n<p>If your website is located in California, you may be wondering how to be compliant with the California Consumer Privacy Act.<\/p>\n\n\n\n<p><a href=\"\/en\/ccpa\/\">Read more about the CCPA here.<\/a><\/p>\n\n\n\n<p>Protecting your website and its users from third-party trackers is and remains a solid solution against privacy intrusion by the ad tech industry.<\/p>\n\n\n\n<p>This is what we do at Cookiebot CMP. We do that&nbsp;<em>for<\/em>&nbsp;you. We enable compliance with both GDPR\/ePR and CCPA.<\/p>\n\n\n\n<p><a href=\"https:\/\/admin.cookiebot.com\/signup\">Try Cookiebot CMP for free.<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-does-our-cookie-scripts-do-exactly\">What does our cookie scripts do, exactly?<\/h2>\n\n\n\n<p>Cookie scripts are the locks to your virtual house, so you and your guests can be safe.<\/p>\n\n\n\n<p>When you implement cookie scripts on your website, they load a JavaScript that exposes, groups and controls all tracking, first or third-party, on your domain.<\/p>\n\n\n\n<p>On the behavioral markets of the ad tech industry today, personal information and data is <a href=\"https:\/\/www.nytimes.com\/2019\/06\/03\/opinion\/google-facebook-data-privacy.html\" target=\"_blank\" rel=\"noreferrer noopener\">harvested and sold to the highest bidder billions of times each day<\/a>&nbsp;in what is known as&nbsp;<em>real time bidding systems<\/em>&nbsp;that most people are completely unaware of.<\/p>\n\n\n\n<p>This has frightening implications for human anonymity, autonomy and identity.<\/p>\n\n\n\n<p>These markets are based on predictive analyses of behavioral data (that means the data of who you are and what you do), and they profit greatly from attempting to herd users towards the predictive commercial outcomes.<\/p>\n\n\n\n<p>In defiance of this run-amok ad tech industry, our CEO spent five years in his attic developing what came to be the Cookiebot CMP solution: <strong>a window in your virtual house and a lock on your digital front door.<\/strong><\/p>\n\n\n\n<p>Our cookie message scripts protect your users' privacy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-our-cookiebot-cmp-cookie-scripts\">Our Cookiebot CMP cookie scripts<\/h3>\n\n\n\n<p><a href=\"\/\">Cookiebot CMP<\/a>&nbsp;is quickly becoming the de facto standard cookie solution in the industry today because of our well-thought out and worked-through cookie scripts that enable full GDPR\/ePR and CCPA compliance and peace of mind when it comes to website cookies and tracking.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/media\/3569\/skaermbillede-2019-06-04-kl-105430.png?width=500&amp;\" alt=\"Screenshot of Cookiebot cookie scripts - Cookiebot\" width=\"580\" height=\"223\" width=\"580\" height=\"223\"\/><figcaption class=\"wp-element-caption\">An example of Cookiebot CMP cookie scripts locking your doors, keeping you safe.<\/figcaption><\/figure>\n\n\n\n<p>As generators of cookie scripts, our mission at <a href=\"http:\/\/www.usercentrics.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Usercentrics<\/a>&nbsp;- the parent-company of <a href=\"\/\">Cookiebot CMP<\/a>&nbsp;- to push for a safer internet by protecting the fundamental rights of privacy. Our cookie scripts are our humble, but thorough and effective contribution to this larger struggle raging today. Behind our Cookiebot CMP scripts are other parts of our technology that enables privacy on your website.<\/p>\n\n\n\n<p>The <a href=\"\/\">Cookiebot CMP<\/a>&nbsp;scanner <strong>maps out the cookies and tracking on your domains<\/strong>, and our cookie scripts <strong>block them into groups<\/strong>&nbsp;determined by their function.<\/p>\n\n\n\n<p>Control is then <strong>handed over to the website visitor<\/strong>, who is presented with a <strong>cookie consent banner<\/strong>, in which they can choose what tracking they will allow to interact with their devices.<\/p>\n\n\n\n<p>Look and lock with cookie scripts.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/media\/3570\/skaermbillede-2019-06-04-kl-115505.png?width=500&amp;\" alt=\"Cookie message scripts screenshot - Cookiebot\" width=\"584\" height=\"208\" width=\"584\" height=\"208\"\/><figcaption class=\"wp-element-caption\">Cookiebot CMP script cookies are regulated by, from the point of view of the developer and website operator.&nbsp;<\/figcaption><\/figure>\n\n\n\n<p><a href=\"\/\">Cookiebot CMP<\/a>&nbsp;operates two types of cookie scripts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A consent dialog script code<\/strong>, which is a cookie script that manages the prior consent banner required by the European GDPR.<\/li>\n\n\n\n<li><strong>A cookie declaration script code<\/strong>, which is a cookie script that shows the end-user the entirety of your website's cookies and tracking, whether of own or third-party provenance tracking cookies.<\/li>\n<\/ul>\n\n\n\n<p>The first cookie script will manage the <strong>cookie consent banner<\/strong>&nbsp;that you undoubtably know from most websites today.<\/p>\n\n\n\n<p>The second cookie script will spawn the <strong>cookie declaration<\/strong>, in which each cookie is <strong>named<\/strong>, its <strong>provider identified<\/strong>, its <strong>purpose specified<\/strong>, and <strong>its expiration stated<\/strong>.<\/p>\n\n\n\n<p>This useful declaration of all the otherwise hidden workings and wirings of your website can be easily integrated in your website\u2019s privacy policy or cookie policy text. This way, you make sure that you are always up to date and honest about what your visitors can expect from your domain.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/media\/4333\/consent_en.png?width=500&amp;\" alt=\"Cookieboot Pop Up Banner - Cookiebot\" width=\"770\" height=\"449\" width=\"770\" height=\"449\"\/><figcaption class=\"wp-element-caption\">Cookiebot CMP consent banner from the point of view of the end-user.<\/figcaption><\/figure>\n\n\n\n<p>To implement the <strong>cookie consent banner<\/strong>&nbsp;on your domain, follow <a href=\"\/en\/help\/\">the three-step process here.<\/a><\/p>\n\n\n\n<p>It is <strong>important to follow all three steps<\/strong>&nbsp;order to make sure that your website is GDPR compliant.<\/p>\n\n\n\n<p>Once it is implemented correctly, the cookie consent&nbsp;banner will feature when a user arrives on your domain, giving them the choice of consent.<\/p>\n\n\n\n<p>To see how Cookiebot CMP works on the inside, <a href=\"\/en\/developer\/\">visit our developer page<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/admin.cookiebot.com\/signup\">Try Cookiebot CMP for free now<\/a>&nbsp;and scan your website to see how unlocked and wide-open your doors are, and how many strangers are roaming around in your virtual house already.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-martech-5000-visions-of-the-hidden\">Martech 5000: visions of the hidden<\/h2>\n\n\n\n<p>In this world of cookie and tracking and real time bidding systems selling your users\u2019 personal information, it can sometimes be hard to get a handle on what to do to protect yourself and your users from being surveilled by hundreds of anonymous ad tech companies around the world.<\/p>\n\n\n\n<p>The ad tech industry itself is also a very abstract thing. But it\u2019s a thing, a very real thing.<\/p>\n\n\n\n<p>The ad tech industry is as unfathomably large and intricate as a&nbsp;<em>cookie script<\/em>&nbsp;is technical.<\/p>\n\n\n\n<p>But there is a way to see it all at once, in one picture \u2013 it\u2019s called the <strong>Martech 5000<\/strong>, or LumaSpace as it is also known within the industry.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/media\/3572\/martech.jpg?width=500&amp;\" alt=\"Infographic of the marketing technology landscape (Martech 5000) - Cookiebot\" width=\"770\" height=\"433\" width=\"770\" height=\"433\"\/><figcaption class=\"wp-element-caption\">The <a href=\"https:\/\/chiefmartec.com\/2019\/04\/marketing-technology-landscape-supergraphic-2019\/\" target=\"_blank\" rel=\"noreferrer noopener\">Martech 5000<\/a>&nbsp;(or marketing technology landscape) paints a large picture of the 7.040 \"marketing technology solutions\" that make up the ad tech industry.<\/figcaption><\/figure>\n\n\n\n<p>It took nine people four months to complete this tableau of surveillance capitalism.<\/p>\n\n\n\n<p>It is a rare glimpse into the vast ecosystem of the ad tech industry: seven thousand four hundred companies, of the most well-known are <strong>Google<\/strong>, <strong>Twitter<\/strong>, <strong>Apple<\/strong>, <strong>Microsoft<\/strong>&nbsp;and <strong>LinkedIn<\/strong>.<\/p>\n\n\n\n<p>This is the industry behind behavioral advertisement, real time bidding and data harvesting, so big that it might seem impossible to do anything about.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-pierce-the-veil-lock-the-door-cookie-scripts-against-the-martech-5000\">Pierce the veil, lock the door: cookie scripts against the Martech 5000<\/h3>\n\n\n\n<p><a href=\"\/\">Cookiebot CMP<\/a>&nbsp;creates a balance through transparency and self-determination of the as-is unchecked monetization of personal information.<\/p>\n\n\n\n<p>A cookie script with its cookie consent text from <a href=\"\/\">Cookiebot CMP<\/a>&nbsp;enables website owners to protect their end-users\u2019 privacy and ensures a safeguarding of their personal information, so that it doesn\u2019t end up circulating the vast behavioral markets without their knowledge and consent.<\/p>\n\n\n\n<p>The Cookiebot CMP cookie scanner installs a window and reveals for all to see the behavioral markets of surveillance capitalism.<\/p>\n\n\n\n<p>The Cookiebot CMP cookie scripts then lock your door, so that the users are safe and secure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-behavioral-advertisement-doesn-t-work-for-anyone-but-the-ad-tech-industry\">Behavioral advertisement doesn't work for anyone but the ad tech industry<\/h3>\n\n\n\n<p>The shocking handling of user data has often been justified by the industry itself with the argument that it provides huge value to publishers and businesses.<\/p>\n\n\n\n<p>But <a href=\"https:\/\/www.wsj.com\/articles\/behavioral-ad-targeting-not-paying-off-for-publishers-study-suggests-11559167195\/?redirect=amp#click=https:\/\/t.co\/ai1PWrLffM&amp;ns=prod\/accounts-wsj\" target=\"_blank\" rel=\"noreferrer noopener\">a recent study published by the Wall Street Journal<\/a>&nbsp;\u2013 the first empirical study of its kind \u2013 suggests that the impact of behaviorally targeted advertising on publisher\u2019s revenue amounts to only a 4% increase in revenue.<\/p>\n\n\n\n<p><em>\u201cThe harm to privacy, the expansion of government surveillance, the ability to microtarget and drive divisive content (\u2026) were often justified to industry because of this \u2018huge\u2019 value to publishers\u201d,<\/em>&nbsp;Ashkan Soltani, co-author of the CCPA commented on the conclusions of the study.&nbsp;<\/p>\n\n\n\n<p>The real profits go to the ad tech industry, along with the power of surveillance.<\/p>\n\n\n\n<p>For an industry that charges sixty cents for every dollar spent on digital ads, these are sobering findings.<\/p>\n\n\n\n<p>For all of us fighting for a human future beyond digital surveillance, this is yet another look through the window at the ugly truth of surveillance capitalism.<\/p>\n\n\n\n<p>Here at <a href=\"http:\/\/www.usercentrics.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Usercentrics<\/a>, we believe that a cookie solution like ours \u2013 with our cookie scripts that manage consent and our full tracking declarations \u2013 is the right way forward.<\/p>\n\n\n\n<p>Try our cookie software today.<\/p>\n\n\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>What is a cookie script? For those of us somewhat new or alien to the developer\u2019s world, the term script simply refers to the \u201cscripting language\u201d that a developer writes in when they code a website or an app or what have you. It\u2019s a string of text, a coding language that commands functions and [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":12449,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"editor_notices":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1030","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"thumbnail_status":"The image is too white. Please, check the original image for faulty SVGs. If the original image is in SVG format, try to upload the PNG or JPEG version instead.","thumbnail_url":"https:\/\/www.cookiebot.com\/us\/wp-content\/uploads\/sites\/8\/2022\/01\/Cookie-Script_1200x630_ffffff.png","_links":{"self":[{"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/posts\/1030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":0,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/media\/12449"}],"wp:attachment":[{"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cookiebot.com\/us\/wp-json\/wp\/v2\/tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}