{"id":130,"date":"2026-07-20T14:23:00","date_gmt":"2026-07-20T12:23:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=130"},"modified":"2026-10-26T10:53:17","modified_gmt":"2026-10-26T09:53:17","slug":"controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/","title":{"rendered":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM"},"content":{"rendered":"<p>Microsoft Universal Event Tracking (UET) is measurement code, also called a tag. It records actions such as a purchase or form submission as advertising conversions. Consent Mode passes a consent state to the tag and controls cookie access. A banner collects the decision; Consent Mode applies the decision technically. The setting does not automatically authorize every data transfer.<\/p>\n<h2>Basic and Advanced are different setups<\/h2>\n<p><strong>Basic<\/strong> blocks UET until the required consent exists. <strong>Advanced<\/strong> loads UET with an explicit <code>denied<\/code> default and sends restricted measurement signals. Microsoft describes the data as anonymized and aggregated before modeling. That description is not a general guarantee that every network request in every implementation contains no personal information.<\/p>\n<p>The <code>ad_storage<\/code> signal controls cookie access. According to Microsoft, <code>denied<\/code> prevents reading and writing first-party UET cookies and writing third-party cookies. Existing third-party cookies may still be read for fraud and spam prevention. \u201cNo cookies\u201d is therefore an imprecise blanket description.<\/p>\n<figure class=\"lw-diagram\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-130-msconsent-20261024.png\" width=\"1120\" height=\"560\" alt=\"Comparison of the Microsoft UET consent signal with the four Google Consent Mode signals and the two implementation paths\"><figcaption>UET uses ad_storage for cookie access. Google signals cover different purposes. Basic blocks the tag; Advanced sends restricted signals.<\/figcaption><\/figure>\n<h2>Direct JavaScript implementation<\/h2>\n<p>Each page needs a denied default early enough to prevent the first measurement from using an incorrect state. The following fragment sets the default and defines an update function. The UET base tag, banner interface and stored-choice handling remain separate parts of the integration.<\/p>\n<pre><code>window.uetq = window.uetq || [];\nwindow.uetq.push(&#x27;consent&#x27;, &#x27;default&#x27;, { ad_storage: &#x27;denied&#x27; });\n\nfunction updateUetConsent(advertisingAllowed) {\n  window.uetq = window.uetq || [];\n  window.uetq.push(&#x27;consent&#x27;, &#x27;update&#x27;, {\n    ad_storage: advertisingAllowed === true ? &#x27;granted&#x27; : &#x27;denied&#x27;\n  });\n}<\/code><\/pre>\n<p>The consent management platform (CMP), which manages the banner and stored consent choices, calls <code>updateUetConsent(true)<\/code> only for valid advertising consent. Rejection, withdrawal or missing permission calls <code>updateUetConsent(false)<\/code>. A still-valid stored choice must also be transmitted on subsequent pages. This function does not create a banner or persist a choice.<\/p>\n<h2>Implementation through Google Tag Manager<\/h2>\n<p>The current official UET template supports GTM consent states. A correctly configured CMP supplies the initial state and subsequent updates. No particular third-party consent template is universally required.<\/p>\n<ul>\n<li><strong>Enable consent updates:<\/strong> Receives changes. A state set before UET loads needs particular attention.<\/li>\n<li><strong>Inherit Initial User Consent:<\/strong> Reads the initial state. This option needs a reliable state supplied by the CMP first; a missing default must not become consent.<\/li>\n<li><strong>Additional Consent Checks:<\/strong> Requiring <code>ad_storage<\/code> prevents firing without consent. This is a Basic-style block, not a running Advanced implementation. A suitable trigger must actually fire the previously blocked tag after consent.<\/li>\n<\/ul>\n<h2>Comparison with Google and other platforms<\/h2>\n<p>UET uses <code>ad_storage<\/code> here. Google distinguishes purposes through signals including <code>analytics_storage<\/code>, <code>ad_storage<\/code>, <code>ad_user_data<\/code> and <code>ad_personalization<\/code>. Four values do not represent the same decision repeated four times. These interfaces provide no reliable general ranking of modeling maturity or required data volume.<\/p>\n<p>Other platforms need separate checks. TikTok, for example, documents cookie and consent controls of its own. The claim that every other platform only supports a complete tag block is therefore inaccurate. Suppressing cookies, preventing all tag execution and sending server events are different measures.<\/p>\n<h2>Tests that matter<\/h2>\n<p>Separate tests cover a fresh browser profile, rejection, acceptance, withdrawal and a subsequent page. UET Tag Helper reports the consent state; network requests and cookie storage reveal actual behavior. Basic must produce no UET requests before permission. Advanced requests before permission must carry the denied state. A clean GTM preview alone does not prove these conditions.<\/p>\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n<h3>Does Consent Mode replace consent?<\/h3>\n<p>No. A signal communicates a decision; a signal does not replace the required information or lawful basis.<\/p>\n<h3>Does UET consent automatically cover Clarity?<\/h3>\n<p>No. Microsoft requires a separate Clarity setting for the UET-Clarity integration.<\/p>\n<h3>Does a server API solve the consent issue?<\/h3>\n<p>No. Server-side events also need a lawful basis and appropriate purpose permissions. Moving processing from a browser to a server does not remove those requirements.<\/p>\n<\/div>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/advertising\/msa-help\/hlp_ba_conc_uet_consentfaq\" target=\"_blank\" rel=\"noopener noreferrer\">UET consent FAQ<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/advertising\/msa-help\/hlp_ba_conc_uet_consent\" target=\"_blank\" rel=\"noopener noreferrer\">UET consent setup<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/advertising\/msa-help\/hlp_ba_conc_uet_dynamicconsentgtm\" target=\"_blank\" rel=\"noopener noreferrer\">Official UET GTM template<\/a><\/li>\n<li><a href=\"https:\/\/ads.tiktok.com\/resources\/help\/article\/how-to-use-cookies-with-tiktok-pixel\" target=\"_blank\" rel=\"noopener noreferrer\">TikTok Pixel cookies<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/tag-platform\/security\/guides\/consent\" target=\"_blank\" rel=\"noopener noreferrer\">Google consent setup<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft Ads Consent Mode configuration: UET consent states via JavaScript or GTM and comparison with Google Consent Mode. A separate section distinguishes the consent mechanisms used by other advertising platforms.<\/p>\n","protected":false},"author":1,"featured_media":31547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[91040,91041,91261,91279,91270,91267],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-digital-marketing","tag-consent-management","tag-consent-mode-v2","tag-conversion-tracking","tag-prywatnosc-danych-pl","tag-gdpr","tag-google-tag-manager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik<\/title>\n<meta name=\"description\" content=\"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-20T12:23:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-26T09:53:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM\",\"datePublished\":\"2026-07-20T12:23:00+00:00\",\"dateModified\":\"2026-10-26T09:53:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/\"},\"wordCount\":616,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-130.png\",\"keywords\":[\"Consent Management\",\"Consent Mode v2\",\"Conversion Tracking\",\"Data Privacy\",\"GDPR\",\"Google Tag Manager\"],\"articleSection\":[\"Digital Marketing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/\",\"name\":\"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-130.png\",\"datePublished\":\"2026-07-20T12:23:00+00:00\",\"dateModified\":\"2026-10-26T09:53:17+00:00\",\"description\":\"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-130.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/klarheit-20261111-130.png\",\"width\":1200,\"height\":630,\"caption\":\"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/digital-marketing\\\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik","description":"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.","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:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/","og_locale":"en_US","og_type":"article","og_title":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik","og_description":"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-07-20T12:23:00+00:00","article_modified_time":"2026-10-26T09:53:17+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM","datePublished":"2026-07-20T12:23:00+00:00","dateModified":"2026-10-26T09:53:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/"},"wordCount":616,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png","keywords":["Consent Management","Consent Mode v2","Conversion Tracking","Data Privacy","GDPR","Google Tag Manager"],"articleSection":["Digital Marketing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/","name":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png","datePublished":"2026-07-20T12:23:00+00:00","dateModified":"2026-10-26T09:53:17+00:00","description":"Configure Microsoft Ads Consent Mode: pass UET consent states via JavaScript or GTM and compare the approach with Google Consent Mode.","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/klarheit-20261111-130.png","width":1200,"height":630,"caption":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/digital-marketing\/controlling-cookie-consent-for-microsoft-ads-consent-mode-with-javascript-and-gtm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Controlling Cookie Consent for Microsoft Ads: Consent Mode with JavaScript and GTM"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":12,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":26334,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions\/26334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/31547"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}