{"id":12490,"date":"2019-04-21T15:00:08","date_gmt":"2019-04-21T18:00:08","guid":{"rendered":"https:\/\/dilmarames.com\/how-to-install-google-tag-manager-in-wordpress\/"},"modified":"2023-04-07T17:48:22","modified_gmt":"2023-04-07T20:48:22","slug":"how-to-install-google-tag-manager-in-wordpress","status":"publish","type":"post","link":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/","title":{"rendered":"How to install Google Tag Manager in WordPress"},"content":{"rendered":"\n<p><strong>This is a practical guide for those who want to install Google Tag Manager in WordPress. For those who don&#8217;t know, GTM is a tag manager (from Google) that makes the life of any developer, marketer, or website owner much easier. I will cover the two main methods of installing GTM on WordPress: (1) using a plugin and (2) editing the site template files. Let&#8217;s go!<\/strong><\/p>\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Index<\/h2><ul><li><a href=\"#instalando-o-gtm\" data-level=\"2\">Installing Google Tag Manager on your website<\/a><\/li><\/ul><\/div>\n\n<p>If you do not yet have a Google Tag Manager account I suggest you read this article in full. If you already have an account, <a href=\"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#instalando-o-gtm\">skip to the second step<\/a>.<\/p>\n\n<h2 class=\"wp-block-heading\">Creating a Google Tag Manager (GTM) account<\/h2>\n\n<div class=\"schema-how-to wp-block-yoast-how-to-block\"><p class=\"schema-how-to-total-time\"><span class=\"schema-how-to-duration-time-text\">Tempo necess\u00e1rio para esta implementa\u00e7\u00e3o:&nbsp;<\/span>2 minutes<\/p><p class=\"schema-how-to-description\">Creating a Google Tag Manager account<\/p> <ul class=\"schema-how-to-steps\"><li class=\"schema-how-to-step\" id=\"how-to-step-1555788246584\"><strong class=\"schema-how-to-step-name\">Providing information<\/strong> <p class=\"schema-how-to-step-text\">Go to the <a href=\"https:\/\/marketingplatform.google.com\/about\/tag-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Tag Manager (abre numa nova aba)\">Tag Manager<\/a> page and click on the &#8220;Free Trial&#8221; button. Enter your Google credentials.<\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1555788278151\"><strong class=\"schema-how-to-step-name\">Creating the account<\/strong> <p class=\"schema-how-to-step-text\">In the upper right corner click on the &#8220;Create Account&#8221; button.<br><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1555788522826\"><strong class=\"schema-how-to-step-name\">Configuring the Application<\/strong> <p class=\"schema-how-to-step-text\">Then enter the account name, country, URL, and where you want to use the container (Web, iOS, Android, or AMP). Once you have entered this data, click on &#8220;Create&#8221;.  <\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1555788759962\"><strong class=\"schema-how-to-step-name\">Receiving the code<\/strong> <p class=\"schema-how-to-step-text\">Now you will receive the codes and instructions to install the <code>&lt;head&gt;<\/code> tag and also a code to install the  <code>&lt;body&gt;<\/code><\/p> <\/li><\/ul><\/div>\n\n<p>Read also: <a href=\"https:\/\/dilmarames.com\/en\/how-to-install-google-analytics-on-wordpress-using-a-plugin\/\">&#8220;How to install Google Analytics on WordPress using a plugin&#8221;<\/a><\/p>\n\n<h2 class=\"wp-block-heading\" id=\"instalando-o-gtm\">Installing Google Tag Manager on your website<\/h2>\n\n<p>If you did not copy the codes provided when creating the account\/container, log into your container and click on the ID shown at the top of the page:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"840\" height=\"651\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager-840x651.png\" alt=\"Google Tag Manager installation code\" class=\"wp-image-9066\" srcset=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager-840x651.png 840w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager-300x233.png 300w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager-569x441.png 569w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager-768x596.png 768w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/codigo-instalacao-google-tag-manager.png 922w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\">Google Tag Manager installation code<\/figcaption><\/figure>\n<\/div>\n<p>The installation of these codes on the site can be done in two ways: (1) via the WordPress plugin or, (2) by editing the codes of the template used.  <\/p>\n\n<p>Before you choose one of the ways, keep in mind:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>  Whether you have the necessary permissions to configure it the way you have chosen (some security plugins may prevent direct editing of template files for example).<\/li>\n\n\n\n<li>How is the site maintained (do you maintain it yourself or does a team of professionals take care of it for you).<\/li>\n\n\n\n<li>What other features do you want to implement along with Google Tag Manager on your WordPress site (custom dimensions in GA, Google Optimize, etc).  <\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">Installing Google Tag Manager on WordPress using a plugin<\/h3>\n\n<p>One of the great advantages of using a CMS like WordPress is the ability to add functionality through modules, in WordPress called plugins.<\/p>\n\n<p>Probably the best (and the one I recommend) plugin for adding GTM to your WordPress site is the &#8220;DuracellTomi Google Tag Manager for WordPress&#8221;. It is installed like any other plugin:<\/p>\n\n<ol class=\"wp-block-list\">\n<li>Log in to your administrative panel.<\/li>\n\n\n\n<li>Go to Plugins &gt; Add New.<\/li>\n\n\n\n<li>Search for &#8220;Google Tag Manager&#8221;.<\/li>\n\n\n\n<li>Click &#8220;Install&#8221; on the <a rel=\"noreferrer noopener\" aria-label=\" (abre numa nova aba)\" href=\"https:\/\/wordpress.org\/plugins\/duracelltomi-google-tag-manager\/\" target=\"_blank\">DuracellTomi Google Tag Manager for WordPress<\/a> plugin <a rel=\"noreferrer noopener\" aria-label=\" (abre numa nova aba)\" href=\"https:\/\/wordpress.org\/plugins\/duracelltomi-google-tag-manager\/\" target=\"_blank\">.<\/a><\/li>\n\n\n\n<li>Go to Settings &gt; Google Tag Manager and enter your GTM container code in the appropriate field:<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"840\" height=\"390\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/configuracao-gtm-840x390.png\" alt=\"GTM Configuration for WordPress\" class=\"wp-image-9068\" srcset=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/configuracao-gtm-840x390.png 840w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/configuracao-gtm-300x139.png 300w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/configuracao-gtm-768x357.png 768w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/configuracao-gtm.png 1236w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\">GTM Configuration for WordPress<\/figcaption><\/figure>\n<\/div>\n<p>Using the plugin is the safest method for you to insert GTM to your site. Still, depending on your site settings, quality of your theme&#8217;s code, and plugins used there can be setbacks.<\/p>\n\n<p>The <code>&lt;head&gt;<\/code> script is added correctly to your site. It is essential for the functioning of GTM on the site.<\/p>\n\n<p>The script <code>&lt;body&gt;<\/code> is an iframe snippet that acts as a replacement for users with JavaScript disabled (very small number of users). Because WP does not have a <em>hook<\/em> for inserting custom code into the <code>&lt;body&gt;<\/code> tag, by default it is added to the footer. This is not ideal because it reduces the probability of a tag being triggered. It will still work but only after the whole page has loaded.<\/p>\n\n<p>If you need the <code>&lt;body&gt;<\/code> tag to be fired at the correct location, you can choose a custom tag injection method.<\/p>\n\n<p>On my site the <em>Codeless Injection<\/em> method, but I make sure that my theme is aligned to this type of GTM code injection.  <\/p>\n\n<p>To make sure that the chosen injection method is working, perform tests in the main browsers.  <\/p>\n\n<h4 class=\"wp-block-heading\">Advantages of this method:<\/h4>\n\n<ul class=\"wp-block-list\">\n<li>This method automatically activates multiple dataLayer variables that would only be available with a lot of customization. With these variables active you can for example extract data for GA such as author, year of publication, user type, etc.<\/li>\n\n\n\n<li>In the integrations tab you will find the possibility to integrate other features such as ContactForm 7, WooCommerce and AMP.<\/li>\n\n\n\n<li>In addition you can inject the Page Hiding Snippet from Google Optimize to run your experiments more safely.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">Installing Google Tag Manager on WordPress by editing the template<\/h2>\n\n<p>Before making any changes to your theme make sure you have the knowledge to do so. My suggestion is that you avoid making changes to your template files. If you choose this method, try to use best practices, adopting a child theme so that your changes are not lost when your parent theme is updated.<\/p>\n\n<p>Here is what you need to do:<\/p>\n\n<p>In the administrative panel, go to Appearance &gt; Theme Editor:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"393\" height=\"217\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/editor-temas-wordpress.png\" alt=\"WP theme editing\" class=\"wp-image-9078\" srcset=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/editor-temas-wordpress.png 393w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/editor-temas-wordpress-300x166.png 300w\" sizes=\"(max-width: 393px) 100vw, 393px\" \/><\/figure>\n<\/div>\n<p>Select the theme used and insert the GTM tags in the appropriate places:<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"840\" height=\"373\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-via-editor-temas-840x373.png\" alt=\"WordPress Theme Editor\" class=\"wp-image-9079\" srcset=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-via-editor-temas-840x373.png 840w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-via-editor-temas-300x133.png 300w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-via-editor-temas-768x341.png 768w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-via-editor-temas.png 1670w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption class=\"wp-element-caption\">WordPress Theme Editor<\/figcaption><\/figure>\n\n<p>Click &#8220;Update File&#8221; and you are ready to use GTM.<\/p>\n\n<p>Read also: <a href=\"https:\/\/dilmarames.com\/google-analytics-via-google-tag-manager\/\">How to install Google Analytics using Google Tag Manager<\/a><\/p>\n\n<h2 class=\"wp-block-heading\">Testing the GTM Installation<\/h2>\n\n<p>Once the installation phase is over, let&#8217;s check that the chosen method has been implemented correctly.<\/p>\n\n<p>There are a few ways for you to test that your GTM was installed correctly. My recommendation is for you to use the following two methods to make sure everything is right.  <\/p>\n\n<h3 class=\"wp-block-heading\">Method 1: through the page&#8217;s source code<\/h3>\n\n<p>Go to your site, right-click on the page, then click &#8220;View Page Source&#8221;. A new tab will open with the source code for your page. Something like this:<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"700\" height=\"179\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-ok-700x179.png\" alt=\"GTM on site\" class=\"wp-image-9081\"\/><figcaption class=\"wp-element-caption\">Source code of a page with GTM installed via a plugin<\/figcaption><\/figure>\n\n<p>Make sure that both GTM tags are implemented. Test on all pages to make sure it is implemented correctly.  <\/p>\n\n<h3 class=\"wp-block-heading\">Method 2: Using Google&#8217;s Tag Assistant<\/h3>\n\n<p>Google provides an extension that can be added to your browser to quickly check implemented tags, <a rel=\"noreferrer noopener\" aria-label=\"Tag Assistant (abre numa nova aba)\" href=\"https:\/\/get.google.com\/tagassistant\/\" target=\"_blank\">Tag Assistant<\/a>.  <\/p>\n\n<p>Install the extension. Go to your site and click on the extension. It will display the implemented tags.  <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"336\" height=\"441\" src=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-ok-tag-assistant-336x441.png\" alt=\"Google Assistant Tag\" class=\"wp-image-9083\" srcset=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-ok-tag-assistant-336x441.png 336w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-ok-tag-assistant-229x300.png 229w, https:\/\/dilmarames.com\/wp-content\/uploads\/2019\/04\/gtm-ok-tag-assistant.png 569w\" sizes=\"(max-width: 336px) 100vw, 336px\" \/><figcaption class=\"wp-element-caption\">Tag Assistant &#8211; site with GTM tag implemented<\/figcaption><\/figure>\n<\/div>\n<p>If your Google Tag Manager tag is ok you can start enrolling and triggering tags (Google Analytics, Hotjar, Facebook Pixel, etc) within GTM.<\/p>\n\n<p>Now it&#8217;s up to you! What method did you use to insert GTM into your WordPress site? What tags do you use or intend to use? <a href=\"https:\/\/dilmarames.com\/contato\/\">Do you have<\/a> any <a href=\"https:\/\/dilmarames.com\/contato\/\">questions or tips to share<\/a>?  <\/p>\n\n<p>Continue reading: <a href=\"https:\/\/dilmarames.com\/metricas-marketing-digital\/\">Digital Marketing Metrics: which ones are important?<\/a><\/p>\n\n<p>Continue reading: <a href=\"https:\/\/dilmarames.com\/en\/marketing-metrics-partner-metrics\/\">Marketing Metrics: Partner Metrics<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a practical guide for those who want to install Google Tag Manager in WordPress. I will cover the two main methods of installing GTM on WordPress: (1) using a plugin and (2) editing the site template files. Let&#8217;s go!<\/p>\n","protected":false},"author":3,"featured_media":11958,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3649,3644],"tags":[3652,3633,3659],"class_list":["post-12490","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","category-wordpress","tag-google-tag-manager","tag-technical-seo","tag-wordpress-seo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.1 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to install Google Tag Manager in WordPress<\/title>\n<meta name=\"description\" content=\"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Google Tag Manager in WordPress\" \/>\n<meta property=\"og:description\" content=\"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Dilmar Ames\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-21T18:00:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-07T20:48:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress-social.png\" \/>\n<meta name=\"author\" content=\"Dilmar Ames\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dilmarames\" \/>\n<meta name=\"twitter:site\" content=\"@dilmarames\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dilmar Ames\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/\"},\"author\":{\"name\":\"Dilmar Ames\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#\\\/schema\\\/person\\\/66ae1b178b31daa90153322174df13c1\"},\"headline\":\"How to install Google Tag Manager in WordPress\",\"datePublished\":\"2019-04-21T18:00:08+00:00\",\"dateModified\":\"2023-04-07T20:48:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/\"},\"wordCount\":1113,\"publisher\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/instalar-gtm-wordpress.png\",\"keywords\":[\"Google Tag Manager\",\"Technical SEO\",\"WordPress SEO\"],\"articleSection\":[\"Analytics\",\"WordPress\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2019\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/#organization\"},\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/\",\"name\":\"How to install Google Tag Manager in WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/instalar-gtm-wordpress.png\",\"datePublished\":\"2019-04-21T18:00:08+00:00\",\"dateModified\":\"2023-04-07T20:48:22+00:00\",\"description\":\"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#primaryimage\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/instalar-gtm-wordpress.png\",\"contentUrl\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/instalar-gtm-wordpress.png\",\"width\":1200,\"height\":631},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Analytics\",\"item\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/category\\\/analytics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to install Google Tag Manager in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/\",\"name\":\"Dilmar Ames\",\"description\":\"Consultoria de SEO &amp; Analytics\",\"publisher\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#organization\",\"name\":\"Dilmar Ames\",\"alternateName\":\"Ames Digital\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/cropped-logo-dilmar-ames-blue-183x41-1.png\",\"contentUrl\":\"https:\\\/\\\/dilmarames.com\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/cropped-logo-dilmar-ames-blue-183x41-1.png\",\"width\":183,\"height\":41,\"caption\":\"Dilmar Ames\"},\"image\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/dilmarames\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/DilmarAmes\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/#\\\/schema\\\/person\\\/66ae1b178b31daa90153322174df13c1\",\"name\":\"Dilmar Ames\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g\",\"caption\":\"Dilmar Ames\"},\"description\":\"Consultor de SEO e Analytics. Ajudo empresas a melhorarem seu posicionamento nas buscas e tamb\u00e9m seus resultados.\",\"sameAs\":[\"https:\\\/\\\/dilmarames.mystagingwebsite.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/DilmarAmes\\\/\",\"https:\\\/\\\/x.com\\\/dilmarames\"]},{\"@type\":\"HowTo\",\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#howto-1\",\"name\":\"How to install Google Tag Manager in WordPress\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#article\"},\"description\":\"Como criar uma conta no Google Tag Manager\",\"totalTime\":\"P0DT0H2M\",\"step\":[{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#how-to-step-1555788246584\",\"name\":\"Fornecendo informa\u00e7\u00f5es\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"V\u00e1 at\u00e9 a p\u00e1gina do Tag Manager e clique no bot\u00e3o de \\\"Avalia\u00e7\u00e3o Gratuita\\\". Informe suas credenciais do Google.\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#how-to-step-1555788278151\",\"name\":\"Criando a conta\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"No canto superior direito clique no bot\u00e3o \\\"Criar Conta\\\".\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#how-to-step-1555788522826\",\"name\":\"Configurando a aplica\u00e7\u00e3o\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Em seguida, informe o nome da conta, pa\u00eds, URL e onde deseja utilizar o cont\u00eainer (Web, iOS, Android ou AMP). Assim que informar estes dados clique em \\\"Criar\\\".\"}]},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/dilmarames.com\\\/en\\\/how-to-install-google-tag-manager-in-wordpress\\\/#how-to-step-1555788759962\",\"name\":\"Recebendo o c\u00f3digo\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Agora voc\u00ea receber\u00e1 os c\u00f3digos e instru\u00e7\u00f5es para instalar a tag   e tamb\u00e9m um c\u00f3digo para instalar a tag\"}]}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to install Google Tag Manager in WordPress","description":"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!","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:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to install Google Tag Manager in WordPress","og_description":"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!","og_url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/","og_site_name":"Dilmar Ames","article_published_time":"2019-04-21T18:00:08+00:00","article_modified_time":"2023-04-07T20:48:22+00:00","og_image":[{"url":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress-social.png","type":"","width":"","height":""}],"author":"Dilmar Ames","twitter_card":"summary_large_image","twitter_creator":"@dilmarames","twitter_site":"@dilmarames","twitter_misc":{"Written by":"Dilmar Ames","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#article","isPartOf":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/"},"author":{"name":"Dilmar Ames","@id":"https:\/\/dilmarames.com\/en\/#\/schema\/person\/66ae1b178b31daa90153322174df13c1"},"headline":"How to install Google Tag Manager in WordPress","datePublished":"2019-04-21T18:00:08+00:00","dateModified":"2023-04-07T20:48:22+00:00","mainEntityOfPage":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/"},"wordCount":1113,"publisher":{"@id":"https:\/\/dilmarames.com\/en\/#organization"},"image":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress.png","keywords":["Google Tag Manager","Technical SEO","WordPress SEO"],"articleSection":["Analytics","WordPress"],"inLanguage":"en-US","copyrightYear":"2019","copyrightHolder":{"@id":"https:\/\/dilmarames.com\/#organization"},"accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/","url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/","name":"How to install Google Tag Manager in WordPress","isPartOf":{"@id":"https:\/\/dilmarames.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress.png","datePublished":"2019-04-21T18:00:08+00:00","dateModified":"2023-04-07T20:48:22+00:00","description":"A practical guide for those who want to install Google Tag Manager on WordPress. Learn how to install GTM via a plugin or by editing the site files. See how!","breadcrumb":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#primaryimage","url":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress.png","contentUrl":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress.png","width":1200,"height":631},{"@type":"BreadcrumbList","@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dilmarames.com\/en\/"},{"@type":"ListItem","position":2,"name":"Analytics","item":"https:\/\/dilmarames.com\/en\/category\/analytics\/"},{"@type":"ListItem","position":3,"name":"How to install Google Tag Manager in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/dilmarames.com\/en\/#website","url":"https:\/\/dilmarames.com\/en\/","name":"Dilmar Ames","description":"Consultoria de SEO &amp; Analytics","publisher":{"@id":"https:\/\/dilmarames.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dilmarames.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dilmarames.com\/en\/#organization","name":"Dilmar Ames","alternateName":"Ames Digital","url":"https:\/\/dilmarames.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dilmarames.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/cropped-logo-dilmar-ames-blue-183x41-1.png","contentUrl":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/cropped-logo-dilmar-ames-blue-183x41-1.png","width":183,"height":41,"caption":"Dilmar Ames"},"image":{"@id":"https:\/\/dilmarames.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/dilmarames","https:\/\/www.linkedin.com\/in\/DilmarAmes\/"]},{"@type":"Person","@id":"https:\/\/dilmarames.com\/en\/#\/schema\/person\/66ae1b178b31daa90153322174df13c1","name":"Dilmar Ames","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/db874dc8736a63b6f8014f9c56f518e49c5403a9511075d094620b5af8f9d44a?s=96&d=mm&r=g","caption":"Dilmar Ames"},"description":"Consultor de SEO e Analytics. Ajudo empresas a melhorarem seu posicionamento nas buscas e tamb\u00e9m seus resultados.","sameAs":["https:\/\/dilmarames.mystagingwebsite.com\/","https:\/\/www.linkedin.com\/in\/DilmarAmes\/","https:\/\/x.com\/dilmarames"]},{"@type":"HowTo","@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#howto-1","name":"How to install Google Tag Manager in WordPress","mainEntityOfPage":{"@id":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#article"},"description":"Como criar uma conta no Google Tag Manager","totalTime":"P0DT0H2M","step":[{"@type":"HowToStep","url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#how-to-step-1555788246584","name":"Fornecendo informa\u00e7\u00f5es","itemListElement":[{"@type":"HowToDirection","text":"V\u00e1 at\u00e9 a p\u00e1gina do Tag Manager e clique no bot\u00e3o de \"Avalia\u00e7\u00e3o Gratuita\". Informe suas credenciais do Google."}]},{"@type":"HowToStep","url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#how-to-step-1555788278151","name":"Criando a conta","itemListElement":[{"@type":"HowToDirection","text":"No canto superior direito clique no bot\u00e3o \"Criar Conta\"."}]},{"@type":"HowToStep","url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#how-to-step-1555788522826","name":"Configurando a aplica\u00e7\u00e3o","itemListElement":[{"@type":"HowToDirection","text":"Em seguida, informe o nome da conta, pa\u00eds, URL e onde deseja utilizar o cont\u00eainer (Web, iOS, Android ou AMP). Assim que informar estes dados clique em \"Criar\"."}]},{"@type":"HowToStep","url":"https:\/\/dilmarames.com\/en\/how-to-install-google-tag-manager-in-wordpress\/#how-to-step-1555788759962","name":"Recebendo o c\u00f3digo","itemListElement":[{"@type":"HowToDirection","text":"Agora voc\u00ea receber\u00e1 os c\u00f3digos e instru\u00e7\u00f5es para instalar a tag   e tamb\u00e9m um c\u00f3digo para instalar a tag"}]}],"inLanguage":"en-US"}]}},"jetpack_featured_media_url":"https:\/\/dilmarames.com\/wp-content\/uploads\/2020\/05\/instalar-gtm-wordpress.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/posts\/12490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/comments?post=12490"}],"version-history":[{"count":0,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/posts\/12490\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/media\/11958"}],"wp:attachment":[{"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/media?parent=12490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/categories?post=12490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dilmarames.com\/en\/wp-json\/wp\/v2\/tags?post=12490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}