{"id":9043,"date":"2021-12-02T14:47:29","date_gmt":"2021-12-02T13:47:29","guid":{"rendered":"https:\/\/www.myagileprivacy.com\/how-to-install-google-tag-manager-in-compliance-with-gdpr\/"},"modified":"2026-01-02T15:10:48","modified_gmt":"2026-01-02T14:10:48","slug":"how-to-install-google-tag-manager-in-compliance-with-gdpr","status":"publish","type":"post","link":"https:\/\/www.myagileprivacy.com\/en\/how-to-install-google-tag-manager-in-compliance-with-gdpr\/","title":{"rendered":"How to install Google Tag Manager in compliance with GDPR"},"content":{"rendered":"<p>Google Tag Manager simplifies the management of various third-party analytics and marketing tools. It\u2019s 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, \u201cGoogle Analytics\u201d).<\/p>\n<p>Let\u2019s see how to <strong>install GDPR-compliant Google Tag Manager<\/strong> on your WordPress site using the My Agile Privacy<sup>\u00ae<\/sup> plugin.<\/p>\n<h2>Solution 1 \u2013 Automatic Scan<\/h2>\n<p>You can use the advanced \"Cookie Shield\" feature, which will automatically detect Google Tag Manager.<br \/>\nSimply set the Shield to \"Learning\" mode and browse your site\u2019s pages; your configuration will be ready.<br \/>\nIf you prefer, manual configuration is also available.<\/p>\n<h2>Solution 2 \u2013 Manual Configuration<\/h2>\n<h3>Part 1 \u2013 Locating Your Google Tag Manager Code<\/h3>\n<p>First, locate the Google Tag Manager code in your Tag Manager dashboard.<br \/>\nIt should look like this:<br \/>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-4641\" src=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1.png\" alt=\"\" width=\"1920\" height=\"666\" srcset=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1.png 1920w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1-300x104.png 300w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1-1024x355.png 1024w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1-768x266.png 768w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/12\/gtagmanager_1-1536x533.png 1536w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h3>Part 2 \u2013 Adding the Google Tag Manager Cookie in My Agile Privacy<sup>\u00ae<\/sup><\/h3>\n<p>In your WordPress admin, go to <em>My Agile Privacy<sup>\u00ae<\/sup> \u2192 Cookie List<\/em>.<br \/>\nHere, you\u2019ll see a list of cookies imported during plugin installation. By default, they are in draft status; publish only those cookies relevant to your website.<br \/>\n<img decoding=\"async\" class=\"aligncenter size-full wp-image-9467\" src=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookielist-en.jpg\" alt=\"\" width=\"1000\" height=\"303\" srcset=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookielist-en.jpg 1000w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookielist-en-300x91.jpg 300w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookielist-en-768x233.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><br \/>\nThe cookie list will show several columns, including:<\/p>\n<ul>\n<li><em>Cookie Name<\/em>: the name of the cookie.<\/li>\n<li><em>Is Necessary<\/em>: indicates if the cookie is essential for your site\u2019s operation. If not accepting the cookie breaks your site, it is marked as essential (pre-filled).<\/li>\n<li><em>Auto Update<\/em>: shows if the cookie\u2019s reference text is kept updated automatically for GDPR compliance. If set to \"yes,\" the texts update automatically.<\/li>\n<li><em>Installation Type<\/em>: the method by which the cookie is added. This may change depending on your setup and requirements.<\/li>\n<\/ul>\n<p>To add Google Tag Manager, search for \"Google Tag Manager (Google, Inc.)\" in the list and click on it.<br \/>\nThe 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.<br \/>\nBelow, select the \"Type of Installation\" (Javascript and Noscript, or Raw). Keep \"Javascript-noscript code\" selected and two fields will appear:<\/p>\n<ul>\n<li><em>Javascript Activation Code<\/em> \u2013 where to enter the main Google Tag Manager code<\/li>\n<li><em>NoScript code<\/em> \u2013 where to enter any <code class=\"\" data-line=\"\">&lt;noscript&gt;<\/code> code<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-9477\" src=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookie-script-code2-en.jpg\" alt=\"\" width=\"1000\" height=\"451\" srcset=\"https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookie-script-code2-en.jpg 1000w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookie-script-code2-en-300x135.jpg 300w, https:\/\/www.myagileprivacy.com\/wp-content\/uploads\/2021\/11\/cookie-script-code2-en-768x346.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3>Part 3 \u2013 Adding the Google Tag Manager Code<\/h3>\n<p>Now, copy your Google Tag Manager code and paste it into the appropriate fields according to the example above.<br \/>\nRemember to enter the code <strong>without<\/strong> the opening and closing <code class=\"\" data-line=\"\">&lt;script&gt;<\/code> and <code class=\"\" data-line=\"\">&lt;\/script&gt;<\/code> tags for the JavaScript field, and without the <code class=\"\" data-line=\"\">&lt;noscript&gt;<\/code> tags for the NoScript field.<br \/>\nDon\u2019t forget to save and publish the cookie by clicking the blue \"Publish\" button in the upper right corner.<\/p>\n<h3>Part 4 \u2013 Verifying Google Consent Mode v2<\/h3>\n<p>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.<br \/>\nYou can find a step-by-step guide here: <a href=\"https:\/\/www.myagileprivacy.com\/en\/supporting-consent-mode-v2-what-it-is-and-how-to-implement-it-gdpr-compliant-with-my-agile-privacy\/\" target=\"_blank\" rel=\"noopener\">how to implement Consent Mode V2 on your website<\/a>.<\/p>\n<h2>Final Step \u2013 Verifying Correct Operation<\/h2>\n<p>To check that Google Tag Manager is installed and configured correctly, use Google\u2019s verification tools or the tools for any third-party scripts you have set up in Tag Manager.<br \/>\nIf you need further assistance, feel free to contact us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Tag Manager simplifies the management of various third-party analytics and marketing tools. It\u2019s 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, \u201cGoogle Analytics\u201d). Let\u2019s see how to install GDPR-compliant Google Tag Manager on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8704,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[33],"tags":[34],"class_list":["post-9043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cookies","tag-premium"],"acf":{"visibilita_box_autore":false,"autore_associato":null,"elenco_faq_articolo":null,"url_esterno":"","titolo":"Google Tag Manager"},"_links":{"self":[{"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/posts\/9043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/comments?post=9043"}],"version-history":[{"count":10,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/posts\/9043\/revisions"}],"predecessor-version":[{"id":15169,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/posts\/9043\/revisions\/15169"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/media\/8704"}],"wp:attachment":[{"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/media?parent=9043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/categories?post=9043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myagileprivacy.com\/en\/wp-json\/wp\/v2\/tags?post=9043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}