Download the ebook now

Thankyou for sharing the details. Here is your ebook on "Top questions people ask about Server Side Tagging".
Oops! Something went wrong while submitting the form.

How To Implement Consent Mode In GA4? | GTM Method For 2023

April 19, 2023
Google Analytics 4 Migration Via Tagmate

Ever since Google released its ‘Consent Mode’ in September 2020 in a bid to safeguard its advertising revenue amid the increasing number of privacy-focused legislations introduced across the globe.

It is one of the many initiatives including server-side tagging and sunsetting third-party cookies, and a lot of website owners are implementing the Consent Mode in Google Analytics 4 to stay compliant to privacy laws with their country. 

Implementing Consent Mode can also have a positive impact on website users since the awareness regarding privacy on the internet has significantly increased over the years.

In this article, I will help you implement Consent Mode for your website in Google Analytics 4 using Google Tag Manager. 

Once we go through the process, we will also have a look at what is Consent Mode, and whether you should use it.

Let’s get started: 

How To Implement Consent Mode In GA4? | GTM Method For 2023

Step-By-Step Process To Enable and Implement Consent Mode

Follow these steps to implement Consent Mode with a few clicks:

Step #1: Go to your Google Tag Manager account (

Step #2: From the Admin dashboard, navigate to the Container Settings

Step #3 Next, go to Additional Settings and check Enable Consent Overview.

How To Implement Consent Mode In GA4? | GTM Method For 2023

In the Tags section, you will be able to see a shield with a check mark known as the Consent Icon. above your tags. 

After you click on it, you will be able to see all your tags under the ‘Consent Not Configured’ section. There’s a separate section below it called ‘Consent Configured’ where all configured tags will appear.

To make the process easier, I recommend adding a single cookie banner across your website with the help of Google Tag Manager as recommended by Benjamin Mangold of Loves Data

This will help you ensure that all tags are fired only when website users give their consent to the cookies. 

Step #4: Next, Navigate to the Import Container option in the Admin section. Select the file and click on Open

To make things easier, you can import the preconfigured container from Loves Data.

Step #5: Next, you need to choose Workspace. Click on Existing and choose your Default Workspace

Here, you will be prompted to choose between two options:

  • Overwrite conflicting tags, triggers, and variables.
  • Rename conflicting tags, triggers, and variables.

Choose the first option and click on Continue.

Step #6: Navigate to Tags and modify the tracking tags

Go to the Tags window and select the GA4 configuration tag. Select ‘Tag Configuration’ and navigate to ‘Advanced Settings’.

Now, select ‘Consent Settings.’ Choose ‘Require Additional Consent For Tag To Fire’ and enter ‘analytics_storage’ in the blank field. This will require people to give their consent to analytics cookies for GA4 to track them.

Hit the save button.

You may use this process for any tag that you feel requires user consent.

Copy the below code and inject it into the GTM container above its default code and click the ‘Save’ button.

Step #7: Go to Preview Mode And Test The Setup 

Verify if the cookie banner loads on your website and then in Google Tag Manager, you will be able to see the tag in the ‘Tags Not Fired’.

Now go to your website and click on ‘Allow’. Refresh the page and go back to the Google Tag Manager. This time, you should be able to see it under the ‘Tags Fired’. 

Wrap Up

As a website owner, respecting user autonomy and upholding transparency are no longer virtue-based initiatives. In fact, they are being mandated by an increasing number of legislations focused on curbing tactics like using third-party cookies

While measures like implementing consent mode boost your website visitor’s trust, they are crucial for mitigating risks posed by not conforming properly to compliance and regulations. 

A large number of website owners merely create Google Analytics, and Google Tag Manager accounts and that’s it. This is because GA4 and GTM are described as necessary steps of creating a website but it is noteworthy that just connecting your website with GA4 and GTM has no benefit whatsoever. These are powerful marketing analytics tools that can deliver exceptional value to your team and customers at large. 

But it requires programming skills and technical know-how which becomes a limiting factor and that’s where Tagmate comes in. With our 40+ ready-to-use templates, you can make the most out of GA4 and GTM in just a few clicks.

Try Tagmate for free now!

Top questions people ask about Server Side Tagging
Download for Free NOW!
Stay a step ahead.
Get served hottest tracking posts from industry-experts every week.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Ready to Get Started
Stay Updated
Subscribe to get the latest news, industry trends, blog posts, and updates.

Set up tags in seconds.
Not days.

Start Free Trial