
Google Tag Manager simplifies the management of various third-party analytics and marketing tools. It’s important to remember that, in addition to configuring Google Tag Manager itself, you need to declare and manage cookies for each third-party tool connected via Tag Manager (for example, “Google Analytics”).
Let’s see how to install GDPR-compliant Google Tag Manager on your WordPress site using the My Agile Privacy® plugin.
You can use the advanced "Cookie Shield" feature, which will automatically detect Google Tag Manager.
Simply set the Shield to "Learning" mode and browse your site’s pages; your configuration will be ready.
If you prefer, manual configuration is also available.
First, locate the Google Tag Manager code in your Tag Manager dashboard.
It should look like this:

In your WordPress admin, go to My Agile Privacy® → Cookie List.
Here, you’ll see a list of cookies imported during plugin installation. By default, they are in draft status; publish only those cookies relevant to your website.

The cookie list will show several columns, including:
To add Google Tag Manager, search for "Google Tag Manager (Google, Inc.)" in the list and click on it.
The detail page will contain pre-filled informational text and two blank fields for code. This text appears in your cookie policy and will be kept up to date if "Allow Automatic Update" is enabled.
Below, select the "Type of Installation" (Javascript and Noscript, or Raw). Keep "Javascript-noscript code" selected and two fields will appear:
<noscript> code
Now, copy your Google Tag Manager code and paste it into the appropriate fields according to the example above.
Remember to enter the code without the opening and closing <script> and </script> tags for the JavaScript field, and without the <noscript> tags for the NoScript field.
Don’t forget to save and publish the cookie by clicking the blue "Publish" button in the upper right corner.
To ensure full GDPR compliance and proper operation of Google Tag Manager, make sure that Google Consent Mode v2 is active and correctly configured on your site.
You can find a step-by-step guide here: how to implement Consent Mode V2 on your website.
To check that Google Tag Manager is installed and configured correctly, use Google’s verification tools or the tools for any third-party scripts you have set up in Tag Manager.
If you need further assistance, feel free to contact us.

