{"id":10421,"date":"2024-11-06T22:46:58","date_gmt":"2024-11-06T22:46:58","guid":{"rendered":"https:\/\/ceowebltd.com\/blog\/?p=10421"},"modified":"2024-11-06T22:46:58","modified_gmt":"2024-11-06T22:46:58","slug":"how-to-implement-consent-mode-for-google-tag-manager-2","status":"publish","type":"post","link":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/","title":{"rendered":"How to implement consent mode for Google Tag Manager"},"content":{"rendered":"<p>Implementing <strong>Consent Mode<\/strong> in <strong>Google Tag Manager<\/strong> (GTM) allows you to control how Google services (such as Google Analytics and Google Ads) collect data based on the user\u2019s consent preferences. This is especially important for compliance with privacy regulations like the <strong>GDPR<\/strong> (General Data Protection Regulation) in the EU and the <strong>CCPA<\/strong> (California Consumer Privacy Act) in California. Consent Mode enables you to adjust the behavior of Google tags based on whether the user has granted consent for analytics or marketing cookies.<\/p>\n<p>Here&#8217;s a step-by-step guide on how to implement Consent Mode with Google Tag Manager:<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#1_Understand_Consent_Mode_Basics\" title=\"1. Understand Consent Mode Basics\">1. Understand Consent Mode Basics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#2_Set_Up_Google_Tag_Manager\" title=\"2. Set Up Google Tag Manager\">2. Set Up Google Tag Manager<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Steps_to_Set_Up_GTM\" title=\"Steps to Set Up GTM:\">Steps to Set Up GTM:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#3_Add_the_Consent_Mode_Initialization_Code\" title=\"3. Add the Consent Mode Initialization Code\">3. Add the Consent Mode Initialization Code<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Consent_Mode_Initialization_Script\" title=\"Consent Mode Initialization Script:\">Consent Mode Initialization Script:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#4_Modify_Your_Consent_Management_System_CMS\" title=\"4. Modify Your Consent Management System (CMS)\">4. Modify Your Consent Management System (CMS)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#5_Modify_GTM_Tags_to_Respect_Consent_Mode\" title=\"5. Modify GTM Tags to Respect Consent Mode\">5. Modify GTM Tags to Respect Consent Mode<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Steps_for_Google_Analytics\" title=\"Steps for Google Analytics:\">Steps for Google Analytics:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Steps_for_Google_Ads\" title=\"Steps for Google Ads:\">Steps for Google Ads:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#6_Testing_Consent_Mode\" title=\"6. Testing Consent Mode\">6. Testing Consent Mode<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Use_GTM_Preview_Mode\" title=\"Use GTM Preview Mode:\">Use GTM Preview Mode:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Verify_with_Google_Tag_Assistant\" title=\"Verify with Google Tag Assistant:\">Verify with Google Tag Assistant:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#Check_Google_Analytics\" title=\"Check Google Analytics:\">Check Google Analytics:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#7_Publishing_Your_Container\" title=\"7. Publishing Your Container\">7. Publishing Your Container<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#8_Ongoing_Compliance\" title=\"8. Ongoing Compliance\">8. Ongoing Compliance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#_Conclusion\" title=\"\u00a0Conclusion\">\u00a0Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"1_Understand_Consent_Mode_Basics\"><\/span><strong>1. Understand Consent Mode Basics<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Consent Mode works by allowing you to send consent signals to Google services (e.g., Analytics, Ads) about whether the user has consented to the use of specific types of cookies (analytics or advertising cookies). When Consent Mode is active, Google services will adjust the behavior of their tags, ensuring that they do not track or personalize content for users who haven\u2019t given consent.<\/p>\n<p>There are two types of consents that Consent Mode tracks:<\/p>\n<ul>\n<li><strong><code>analytics_storage<\/code><\/strong>: Whether the user has consented to the use of cookies for analytics tracking.<\/li>\n<li><strong><code>ad_storage<\/code><\/strong>: Whether the user has consented to the use of cookies for advertising tracking.<\/li>\n<\/ul>\n<p>Consent Mode sends the following signals:<\/p>\n<ul>\n<li><strong>Granted<\/strong>: User consented to the storage and use of cookies.<\/li>\n<li><strong>Denied<\/strong>: User did not consent to the storage and use of cookies.<\/li>\n<li><strong>Default (Undefined)<\/strong>: No user action has been taken yet, meaning no cookies should be set.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"2_Set_Up_Google_Tag_Manager\"><\/span><strong>2. Set Up Google Tag Manager<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before implementing Consent Mode, you need to ensure that <strong>Google Tag Manager<\/strong> is installed correctly on your website.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Steps_to_Set_Up_GTM\"><\/span>Steps to Set Up GTM:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li>Log in to your Google Tag Manager account.<\/li>\n<li>Create a new container if you haven\u2019t already, or use an existing one.<\/li>\n<li>Install the GTM container code on your website. This includes the code snippet in both the <code>&lt;head&gt;<\/code> and <code>&lt;body&gt;<\/code> tags of your HTML.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"3_Add_the_Consent_Mode_Initialization_Code\"><\/span><strong>3. Add the Consent Mode Initialization Code<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Consent Mode must be initialized on your site before any tags are fired. To do this, you\u2019ll need to add the following JavaScript snippet to your website before any other GTM code. This initialization script should be placed in the <code>&lt;head&gt;<\/code> section of your HTML page.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Consent_Mode_Initialization_Script\"><\/span>Consent Mode Initialization Script:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<div class=\"contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950\">\n<div class=\"flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none\">html<\/div>\n<div class=\"sticky top-9 md:top-[5.75rem]\">\n<div class=\"absolute bottom-0 right-2 flex h-9 items-center\">\n<div class=\"flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary\"><span class=\"\" data-state=\"closed\"><button class=\"flex gap-1 items-center select-none py-1\">Copy code<\/button><\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"!whitespace-pre hljs language-html\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\"><br \/>\n  <span class=\"hljs-comment\">\/\/ Default Consent Mode initialization with no consent<\/span><br \/>\n  <span class=\"hljs-variable language_\">window<\/span>.<span class=\"hljs-property\">gtag<\/span> = <span class=\"hljs-variable language_\">window<\/span>.<span class=\"hljs-property\">gtag<\/span> || <span class=\"hljs-keyword\">function<\/span>(){dataLayer.<span class=\"hljs-title function_\">push<\/span>(<span class=\"hljs-variable language_\">arguments<\/span>);}<br \/>\n  <span class=\"hljs-title function_\">gtag<\/span>(<span class=\"hljs-string\">'consent'<\/span>, <span class=\"hljs-string\">'default'<\/span>, {<br \/>\n    <span class=\"hljs-string\">'analytics_storage'<\/span>: <span class=\"hljs-string\">'denied'<\/span>,  <span class=\"hljs-comment\">\/\/ Default setting: no analytics cookies<\/span><br \/>\n    <span class=\"hljs-string\">'ad_storage'<\/span>: <span class=\"hljs-string\">'denied'<\/span>          <span class=\"hljs-comment\">\/\/ Default setting: no ad cookies<\/span><br \/>\n  });<br \/>\n<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span><br \/>\n<\/code><\/div>\n<\/div>\n<p>This code initializes <strong>Consent Mode<\/strong> by setting the consent state to <code>\"denied\"<\/code> for both <strong>analytics_storage<\/strong> and <strong>ad_storage<\/strong>, meaning no cookies will be set by default. This ensures compliance with privacy regulations from the moment the page is loaded, before any tags are fired.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4_Modify_Your_Consent_Management_System_CMS\"><\/span><strong>4. Modify Your Consent Management System (CMS)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Next, you need to integrate Consent Mode with your <strong>Consent Management Platform (CMP)<\/strong> or cookie consent solution. This allows the user to make their consent choices and for GTM to respond to those choices.<\/p>\n<ol>\n<li><strong>Integrate CMP with GTM<\/strong>: You should configure your CMP to send consent states to Google Tag Manager. Once the user interacts with the consent banner (i.e., accepts or rejects cookies), the CMP should trigger an event in GTM.<\/li>\n<li><strong>Pass Consent Data to GTM<\/strong>: After the user gives or denies consent, you will need to update the <code>gtag<\/code> consent state to reflect the user\u2019s choices. The CMP should trigger an event that updates the <code>gtag('consent', ...)<\/code> with the user&#8217;s preferences.<\/li>\n<\/ol>\n<p>Example code to update the consent state after user consent:<\/p>\n<div class=\"contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950\">\n<div class=\"flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md h-9 bg-token-sidebar-surface-primary dark:bg-token-main-surface-secondary select-none\">javascript<\/div>\n<div class=\"sticky top-9 md:top-[5.75rem]\">\n<div class=\"absolute bottom-0 right-2 flex h-9 items-center\">\n<div class=\"flex items-center rounded bg-token-sidebar-surface-primary px-2 font-sans text-xs text-token-text-secondary dark:bg-token-main-surface-secondary\"><span class=\"\" data-state=\"closed\"><button class=\"flex gap-1 items-center select-none py-1\">Copy code<\/button><\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"!whitespace-pre hljs language-javascript\"><span class=\"hljs-comment\">\/\/ If user accepts analytics and ads cookies<\/span><br \/>\n<span class=\"hljs-title function_\">gtag<\/span>(<span class=\"hljs-string\">'consent'<\/span>, <span class=\"hljs-string\">'update'<\/span>, {<br \/>\n  <span class=\"hljs-string\">'analytics_storage'<\/span>: <span class=\"hljs-string\">'granted'<\/span>,<br \/>\n  <span class=\"hljs-string\">'ad_storage'<\/span>: <span class=\"hljs-string\">'granted'<\/span><br \/>\n});<\/p>\n<p><span class=\"hljs-comment\">\/\/ If user declines cookies<\/span><br \/>\n<span class=\"hljs-title function_\">gtag<\/span>(<span class=\"hljs-string\">'consent'<\/span>, <span class=\"hljs-string\">'update'<\/span>, {<br \/>\n  <span class=\"hljs-string\">'analytics_storage'<\/span>: <span class=\"hljs-string\">'denied'<\/span>,<br \/>\n  <span class=\"hljs-string\">'ad_storage'<\/span>: <span class=\"hljs-string\">'denied'<\/span><br \/>\n});<br \/>\n<\/code><\/div>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"5_Modify_GTM_Tags_to_Respect_Consent_Mode\"><\/span><strong>5. Modify GTM Tags to Respect Consent Mode<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once Consent Mode is initialized, you must ensure that your Google tags in GTM (such as Google Analytics, Google Ads, and other related tags) are set to respect the user\u2019s consent preferences. By default, Google tags are configured to respect Consent Mode, but you may need to make sure that they are set up correctly.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Steps_for_Google_Analytics\"><\/span>Steps for Google Analytics:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Create a Google Analytics Tag<\/strong> in GTM if you haven\u2019t already.<\/li>\n<li>In the <strong>Tag Configuration<\/strong> section, choose <strong>Google Analytics: Universal Analytics<\/strong>.<\/li>\n<li>In the <strong>Tracking ID<\/strong> field, enter your Analytics tracking ID (e.g., <code>UA-XXXXX-Y<\/code>).<\/li>\n<li>Scroll down to <strong>Fields to Set<\/strong> and add the following field:\n<ul>\n<li>Field Name: <code>allowAdFeatures<\/code><\/li>\n<li>Value: <code>{{Allow Ad Features}}<\/code> (You will need to create a variable to track this condition based on the consent status)<\/li>\n<\/ul>\n<\/li>\n<li>In the <strong>Triggers<\/strong> section, ensure that this tag only fires after user consent has been gathered (i.e., after the CMP triggers the consent event).<\/li>\n<\/ol>\n<h4><span class=\"ez-toc-section\" id=\"Steps_for_Google_Ads\"><\/span>Steps for Google Ads:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ol>\n<li><strong>Create a Google Ads Tag<\/strong> in GTM if you haven\u2019t already.<\/li>\n<li>In the <strong>Tag Configuration<\/strong> section, select <strong>Google Ads Conversion Tracking<\/strong>.<\/li>\n<li>Enter your <strong>Conversion ID<\/strong> and <strong>Conversion Label<\/strong>.<\/li>\n<li>Similarly, in the <strong>Fields to Set<\/strong> section, make sure that the tag only fires if the user has granted ad storage consent.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"6_Testing_Consent_Mode\"><\/span><strong>6. Testing Consent Mode<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>After implementing the Consent Mode script and updating your tags, it&#8217;s crucial to test whether the system is working as expected.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Use_GTM_Preview_Mode\"><\/span>Use GTM Preview Mode:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>GTM provides a preview mode where you can test your tags before they are published. You can use the <strong>Preview Mode<\/strong> in GTM to ensure that your tags are firing based on the consent status.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Verify_with_Google_Tag_Assistant\"><\/span>Verify with Google Tag Assistant:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>You can use the <strong>Google Tag Assistant<\/strong> browser extension to verify whether Consent Mode is working. This tool allows you to inspect which tags are firing on the page and if they are respecting the consent choices.<\/li>\n<\/ul>\n<h4><span class=\"ez-toc-section\" id=\"Check_Google_Analytics\"><\/span>Check Google Analytics:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>Use <strong>Google Analytics Real-Time Reports<\/strong> to see if data is being sent only after the user has consented to the appropriate cookies.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"7_Publishing_Your_Container\"><\/span><strong>7. Publishing Your Container<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once everything is set up and tested successfully, you can publish the changes in GTM.<\/p>\n<ol>\n<li>Go to <strong>Admin<\/strong> in your GTM container.<\/li>\n<li>Click on <strong>Submit<\/strong> to publish your changes.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"8_Ongoing_Compliance\"><\/span><strong>8. Ongoing Compliance<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Consent Mode needs to be reviewed periodically to ensure continued compliance with privacy regulations and that any new tags or changes in consent requirements are properly addressed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"_Conclusion\"><\/span><strong>\u00a0Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Implementing Consent Mode in Google Tag Manager allows you to ensure compliance with privacy regulations while respecting user choices regarding cookies and data tracking. By using <strong>Consent Mode<\/strong>, you can control the behavior of tags based on user consent for analytics and advertising cookies, giving you flexibility and control over your website&#8217;s data collection practices. The process involves integrating your CMP with GTM, initializing Consent Mode, adjusting your tags, and testing to ensure that everything functions as expected. This approach helps you strike a balance between data collection and user privacy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Implementing Consent Mode in Google Tag Manager (GTM) allows you to control how Google services (such as Google Analytics and Google Ads) collect data based&#8230;<\/p>\n","protected":false},"author":214,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-10421","post","type-post","status-publish","format-standard","hentry","category-digital-marketing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog\" \/>\n<meta property=\"og:description\" content=\"Implementing Consent Mode in Google Tag Manager (GTM) allows you to control how Google services (such as Google Analytics and Google Ads) collect data based...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/\" \/>\n<meta property=\"og:site_name\" content=\"CEOweb Ltd. Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-06T22:46:58+00:00\" \/>\n<meta name=\"author\" content=\"Emmanuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Emmanuel\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/\",\"url\":\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/\",\"name\":\"How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ceowebltd.com\/blog\/#website\"},\"datePublished\":\"2024-11-06T22:46:58+00:00\",\"dateModified\":\"2024-11-06T22:46:58+00:00\",\"author\":{\"@id\":\"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/4759c204c0b0f1d134ec16e8ec777a6f\"},\"breadcrumb\":{\"@id\":\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ceowebltd.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to implement consent mode for Google Tag Manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ceowebltd.com\/blog\/#website\",\"url\":\"https:\/\/ceowebltd.com\/blog\/\",\"name\":\"CEOweb Ltd. Blog\",\"description\":\"Guest Posting - Digital Marketing &amp; Web Services\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ceowebltd.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/4759c204c0b0f1d134ec16e8ec777a6f\",\"name\":\"Emmanuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9e883d40261b9b272de51992551b3eec4df631b7579a4fbec69c36a006dcbaf2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9e883d40261b9b272de51992551b3eec4df631b7579a4fbec69c36a006dcbaf2?s=96&d=mm&r=g\",\"caption\":\"Emmanuel\"},\"url\":\"https:\/\/ceowebltd.com\/blog\/author\/emmanuel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog","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:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/","og_locale":"en_US","og_type":"article","og_title":"How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog","og_description":"Implementing Consent Mode in Google Tag Manager (GTM) allows you to control how Google services (such as Google Analytics and Google Ads) collect data based...","og_url":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/","og_site_name":"CEOweb Ltd. Blog","article_published_time":"2024-11-06T22:46:58+00:00","author":"Emmanuel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Emmanuel","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/","url":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/","name":"How to implement consent mode for Google Tag Manager - CEOweb Ltd. Blog","isPartOf":{"@id":"https:\/\/ceowebltd.com\/blog\/#website"},"datePublished":"2024-11-06T22:46:58+00:00","dateModified":"2024-11-06T22:46:58+00:00","author":{"@id":"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/4759c204c0b0f1d134ec16e8ec777a6f"},"breadcrumb":{"@id":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ceowebltd.com\/blog\/how-to-implement-consent-mode-for-google-tag-manager-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ceowebltd.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to implement consent mode for Google Tag Manager"}]},{"@type":"WebSite","@id":"https:\/\/ceowebltd.com\/blog\/#website","url":"https:\/\/ceowebltd.com\/blog\/","name":"CEOweb Ltd. Blog","description":"Guest Posting - Digital Marketing &amp; Web Services","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ceowebltd.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/4759c204c0b0f1d134ec16e8ec777a6f","name":"Emmanuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ceowebltd.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9e883d40261b9b272de51992551b3eec4df631b7579a4fbec69c36a006dcbaf2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9e883d40261b9b272de51992551b3eec4df631b7579a4fbec69c36a006dcbaf2?s=96&d=mm&r=g","caption":"Emmanuel"},"url":"https:\/\/ceowebltd.com\/blog\/author\/emmanuel\/"}]}},"_links":{"self":[{"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/posts\/10421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/users\/214"}],"replies":[{"embeddable":true,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/comments?post=10421"}],"version-history":[{"count":1,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/posts\/10421\/revisions"}],"predecessor-version":[{"id":10422,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/posts\/10421\/revisions\/10422"}],"wp:attachment":[{"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/media?parent=10421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/categories?post=10421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ceowebltd.com\/blog\/wp-json\/wp\/v2\/tags?post=10421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}