{"id":29,"date":"2026-05-30T14:51:33","date_gmt":"2026-05-30T14:51:33","guid":{"rendered":"https:\/\/hivechief.com\/?p=29"},"modified":"2026-05-30T15:25:22","modified_gmt":"2026-05-30T15:25:22","slug":"tutorial-implementing-google-consent-mode-v2-via-direct-embed-with-fitconsent","status":"publish","type":"post","link":"https:\/\/hivechief.com\/index.php\/2026\/05\/30\/tutorial-implementing-google-consent-mode-v2-via-direct-embed-with-fitconsent\/","title":{"rendered":"Tutorial: Implementing Google Consent Mode V2 via Direct Embed with FitConsent"},"content":{"rendered":"\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.353), 1.1rem);\">Managing Google Consent Mode V2 manually can be highly error-prone. In this tutorial, we will walk through how FitConsent automates the technical handshake\u2014from dashboard configuration to live validation in your browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google offers two implementation modes for Consent Mode V2: <strong>Basic Mode<\/strong> (which blocks tags entirely until consent is given, losing attribution data) and <strong>Advanced Mode<\/strong>. Google recommends Advanced Mode because it uses cookieless pings to recover up to 70% of lost attribution data for unconsented users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use Advanced Mode, you must inject consent defaults into the <code>dataLayer<\/code> before any tag fires and include a registered Google CMP Partner ID. Here is exactly how FitConsent handles this for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Watch the Video Guide<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Google Consent Mode V2 Setup &amp; Validation \u2014 FitConsent Direct Embed\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/nAvQ2-7X92c?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Dashboard Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s start by configuring the consent banner in your FitConsent dashboard to ensure it outputs the correct Advanced Mode signals.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Add Your Website:<\/strong> In the FitConsent dashboard, click <strong>Add Website<\/strong> in the top right and enter your domain. Once created, click <strong>Configure Website<\/strong>.<\/li>\n\n\n\n<li><strong>General Settings:<\/strong> Enter your GA4 Measurement ID to link FitConsent to your Google Analytics property. Set the <em>Legislative Framework<\/em> to <strong>Auto<\/strong> so FitConsent can dynamically apply the correct legal framework based on the visitor&#8217;s location.<\/li>\n\n\n\n<li><strong>Enable Advanced Mode:<\/strong> This is the most critical step. Toggle <em>Google Consent Mode V2<\/em> to <strong>Advanced<\/strong>. This instructs FitConsent to inject our Google Partner ID into every consent call, certifying your site as CMP-compliant.<\/li>\n\n\n\n<li><strong>Customize Appearance &amp; Behavior:<\/strong> Navigate through the <em>Appearance<\/em>, <em>Content<\/em>, and <em>Behavior<\/em> tabs to adjust colors, text, translations, and button layouts (like enabling\/disabling the Decline button based on your region&#8217;s requirements).<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Integrating the Direct Embed Code<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With the dashboard configured, it is time to add the code to your website. Navigate to the <strong>Integration<\/strong> tab and select <strong>Code and Integration<\/strong> &gt; <strong>Direct Embed<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The code provided here must be pasted into the <code>&lt;head&gt;<\/code> section of every page, <strong>before any other scripts<\/strong> (like Google Analytics or Google Ads). <\/p>\n\n\n\n<blockquote class=\"wp-block-quote has-border-color is-layout-flow wp-block-quote-is-layout-flow\" style=\"border-color:var(--wp--preset--color--contrast);border-width:2px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">\n<p class=\"wp-block-paragraph\"><strong>How the code works:<\/strong> The first block immediately sets all four Consent Mode signals (<code>ad_storage<\/code>, <code>ad_user_data<\/code>, <code>ad_personalization<\/code>, and <code>analytics_storage<\/code>) to <strong>denied<\/strong>. It also passes <code>developer_id: true<\/code>, which registers FitConsent as the active CMP before any user interaction occurs.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Below the default script, you will load your tracking tags, followed by the asynchronous FitConsent banner script which handles the user&#8217;s choice and fires the update calls.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Live Validation in the Browser<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can verify that FitConsent is working perfectly using your browser&#8217;s developer tools.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your website and right-click to <strong>Inspect<\/strong> the page. Navigate to the <strong>Console<\/strong> tab.<\/li>\n\n\n\n<li>Type <code>dataLayer.filter(e =&gt; e[0] === 'consent')<\/code> and press Enter. This isolates the consent-related events.<\/li>\n\n\n\n<li><strong>Inspect the Default Call:<\/strong> Expand the first entry (Index 0). You will see the arguments <code>consent<\/code> and <code>default<\/code>, with all four signals set to <code>denied<\/code> and the <code>developer_id<\/code> present. Notice the <code>gtm.uniqueEventId<\/code> is 1\u2014confirming it fired first.<\/li>\n\n\n\n<li><strong>Interact with the Banner:<\/strong> Click <strong>Accept All<\/strong> on your live banner.<\/li>\n\n\n\n<li><strong>Inspect the Update Call:<\/strong> Run the filter command again and expand the newest entry. You will now see the arguments <code>consent<\/code> and <code>update<\/code>, with all four signals marked as <code>granted<\/code>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Cross-Checking with Google Tag Assistant<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For ultimate peace of mind, you can validate the integration using Google Tag Assistant.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect Tag Assistant to your website URL.<\/li>\n\n\n\n<li>Looking at the event timeline on the left, you will verify that <strong>Consent Default<\/strong> is Event 1.<\/li>\n\n\n\n<li>Navigate to the <strong>Consent<\/strong> tab to view the Event Consent State table.<\/li>\n\n\n\n<li>Before clicking the banner, the <em>On-page Default<\/em>, <em>On-page Update<\/em>, and <em>Current State<\/em> columns will all show <strong>Denied<\/strong> for the four purposes.<\/li>\n\n\n\n<li>After clicking <strong>Accept All<\/strong>, the timeline will show a new Consent Update. The <em>On-page Update<\/em> and <em>Current State<\/em> columns will immediately switch to <strong>Granted<\/strong> for <code>ad_storage<\/code>, <code>analytics_storage<\/code>, <code>ad_user_data<\/code>, and <code>ad_personalization<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s it! Your defaults are set, your updates fire correctly, and Google&#8217;s Tag Assistant confirms you are fully compliant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: If you use a tag-managed environment instead of a direct embed, you can achieve the exact same behavior using the official FitConsent GTM Community Template available in the dashboard.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing Google Consent Mode V2 manually can be highly error-prone. In this tutorial, we will walk through how FitConsent automates the technical handshake\u2014from dashboard configuration to live validation in your browser. Google offers two implementation modes for Consent Mode V2: Basic Mode (which blocks tags entirely until consent is given, losing attribution data) and Advanced [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"_links":{"self":[{"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":3,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/posts\/29\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hivechief.com\/index.php\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}