{"id":42594,"date":"2023-12-13T07:00:26","date_gmt":"2023-12-13T15:00:26","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=42594"},"modified":"2025-05-21T21:22:02","modified_gmt":"2025-05-22T04:22:02","slug":"install-google-tag-manager","status":"publish","type":"post","link":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/","title":{"rendered":"How To Install Google Tag Manager On Your Site (Step-By-Step)"},"content":{"rendered":"\n<p><a href=\"https:\/\/marketingplatform.google.com\/about\/tag-manager\/\" target=\"_blank\" rel=\"noopener\">Google Tag Manager (GTM)<\/a> is a powerful, free tool provided by Google that allows website owners and marketers to manage and deploy marketing tags (snippets of code or tracking pixels) on their website (or mobile app) without needing any coding skills.<\/p>\n\n\n\n<p>In other words, it&#8217;s a tag management system that enables you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app.<\/p>\n\n\n\n<p>Why would someone want to use Google Tag Manager?<\/p>\n\n\n\n<p>GTM simplifies the process of tracking user interactions by providing a user-friendly interface to implement tracking codes, all without the constant need for a developer&#8217;s assistance. Whether you are looking to track basic analytics, monitor specific events like form submissions or clicks, or implement more complex remarketing campaigns, GTM can be an invaluable asset. It allows for greater agility in the digital marketing realm; you can test and deploy tags without having to rely on the IT department to write and release code, making the entire process much more efficient.<\/p>\n\n\n\n<p>Additionally, GTM supports a variety of tags for different marketing platforms, not just from Google&#8217;s suite of tools. This compatibility extends its utility as a centralized tool for managing a variety of different marketing data streams. With the ability to add, edit, and disable tags at a moment&#8217;s notice, marketers gain a significant amount of control over their data collection and reporting processes.<\/p>\n\n\n\n<p>In a nutshell, for anyone looking to streamline their site&#8217;s code and enhance their marketing efforts with minimal technical requirements, Google Tag Manager is an indispensable tool.<\/p>\n\n\n\n<p>Now, let\u2019s walk through how to install Google Tag Manager on your site. It only takes four steps and&nbsp;you can be done in about 10 minutes.<\/p>\n\n\n\n<h2 id=\"step-1\" class=\"wp-block-heading\">Step 1: Create A Google Tag Manager Account<\/h2>\n\n\n\n<p>Getting started with Google Tag Manager is straightforward, and the first step is to set up an account. If you already have a Google account for services like Gmail, Google Drive, or Google Analytics, you can use the same account to sign in to Google Tag Manager. If not, you&#8217;ll need to create a new Google account.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Go to Google Tag Manager. <\/b>Open your web browser and go to the Google Tag Manager website (<a href=\"https:\/\/tagmanager.google.com\/\" target=\"_blank\" rel=\"noopener\">tagmanager.google.com<\/a>). Here, you\u2019ll be greeted with the option to sign in or create an account.<\/li>\n\n\n\n<li><b>Sign in or sign up. <\/b>Click on the &#8220;Sign in&#8221; button if you have an existing Google account, or choose &#8220;Create account&#8221; if you need to make a new one. Follow the on-screen prompts to sign in or to create your new Google account.<\/li>\n\n\n\n<li><b>Create your GTM account. <\/b>Once signed in, you will be prompted to create a new GTM account. Click on the &#8220;Create Account&#8221; button located in the top right corner.<\/li>\n\n\n\n<li><b>Enter your account details. <\/b>You will need to provide a name for your GTM account. Google recommends only having one GTM account per company, even if you have multiple websites, so this is typically the name of your company or organization. Under the same section, you will be asked to select your country.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"871\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/New-Account.jpg\" alt=\"screenshot of the GTM &quot;add an account&quot; screen showing the Account Name and Country fields\" class=\"wp-image-42599 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/New-Account-300x163.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/New-Account-1024x557.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/New-Account-768x418.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/New-Account-1536x836.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-600x327.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-1200x653.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-730x397.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-1460x795.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-784x427.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-1568x854.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/New-Account-877x477.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/871;\" \/><\/figure>\n\n\n\n<p>The next step will be to set up and <a href=\"https:\/\/support.google.com\/tagmanager\/answer\/7582054\" target=\"_blank\" rel=\"noopener\">install a container and tags<\/a> on your website. There are a few different ways you can do this, and we&#8217;ll walk you through two easy ways below.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h2 id=\"step-2\" class=\"wp-block-heading\">Step 2: Install Google Tag Manager Code On Your Site (2 Methods)<\/h2>\n\n\n\n<p>Before you can install GTM on your site, you&#8217;ll need to finish setting up your account by creating a container. The container is the piece of code you add to your site to make Google Tag Manager work. You typically create a unique container for each website you install GTM on, so when you get to the next section in the account setup flow, where you enter your &#8220;Container Name,&#8221; you&#8217;ll typically choose your site name or URL.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"1101\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Setup.jpg\" alt=\"screenshot of the lower half of the account creation screen showing the &quot;container name&quot; field and the &quot;target platform&quot; types\" class=\"wp-image-42600 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Setup-300x206.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Setup-1024x705.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Setup-768x528.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Setup-1536x1057.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-600x413.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-1200x826.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-730x502.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-1460x1005.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-784x539.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-1568x1079.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Setup-877x603.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1101;\" \/><\/figure>\n\n\n\n<p>Next, you&#8217;ll select your &#8220;Target Platform.&#8221; For websites, choose &#8220;Web.&#8221;<\/p>\n\n\n\n<p>Finally, click &#8220;Create.&#8221; This will finalize your account and create your first container. You&#8217;ll see two pop-ups:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The first one is the Google terms of service. Check the box at the bottom of the page and click &#8220;Yes&#8221;&nbsp; at the top right corner to accept them.<\/li>\n\n\n\n<li>The second one is a how-to guide, which includes the code snippets you&#8217;ll need to install your container on your WordPress site. It also explains where to copy and paste the container code, but more on this below.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"1272\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Code.jpg\" alt=\"Google Tag Manager's how-to guide, which includes the code snippets you'll need to install your container on your WordPress site. It also explains where to copy and paste the container code.\" class=\"wp-image-42601 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Code-300x239.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Code-1024x814.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Code-768x611.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Code-1536x1221.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-600x477.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-1200x954.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-730x580.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-1460x1161.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-784x623.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-1568x1247.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Code-877x697.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1272;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">#1: Manually Add GTM Code<\/h3>\n\n\n\n<p>To add the container to your WordPress site manually, you&#8217;ll need to copy those pieces of code from the pop-up and paste them into your website&#8217;s source code.<\/p>\n\n\n\n<p>Here&#8217;s what to do:<\/p>\n\n\n\n<p>Log into your WordPress account. What you do next will vary depending on the version of <a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/\" target=\"_blank\" rel=\"noopener\">WordPress<\/a> you use, your <a href=\"https:\/\/www.dreamhost.com\/glossary\/hosting\/hosting-provider\/\" target=\"_blank\" rel=\"noopener\">hosting company<\/a>, and your <a href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/theme\/\" target=\"_blank\" rel=\"noopener\">theme<\/a>, but you need to find the source code for your theme files.<\/p>\n\n\n\n<p>The navigation bar on the right is a good place to start. Look for \u201cTheme File Editor\u201d either under Appearances or Tools. If you can\u2019t find the source code, skip to <a href=\"#option-2\">Option #2<\/a>, which is much easier for beginners.<\/p>\n\n\n\n\n\n<div class=\"glossary-term\">\n\t<a\n\t\tclass=\"glossary-term__above-title\"\n\t\thref=\"\"\n\t\ttarget=\"_blank\"\n\t\trel=\"noopener noreferrer\"\n\t>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\"><path d=\"M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z\"\/><\/svg>\n\t\t<span><\/span>\n\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 384 512\"><path d=\"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/><\/svg>\n\t<\/a>\n    <h3>Theme Editor<\/h3>\n    <p>The WordPress theme editor is a text editor that enables you to edit a theme\u2019s files directly from the admin dashboard. You can use the editor to upload new files and remove any unwanted ones.<\/p>\n            <a\n            href=\"https:\/\/www.dreamhost.com\/glossary\/wordpress\/theme-editor\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Read More                    <\/a>\n\n<\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"1000\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-File-Editor.jpg\" alt=\"screenshot of the &quot;appearance&quot; drop down menu in WP showing &quot;theme file editor&quot; on the bottom\" class=\"wp-image-42603 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-File-Editor-300x188.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-File-Editor-1024x640.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-File-Editor-768x480.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-File-Editor-1536x960.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-600x375.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-1200x750.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-730x456.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-1460x913.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-784x490.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-1568x980.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-File-Editor-877x548.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1000;\" \/><\/figure>\n\n\n\n<p>Since WordPress themes vary in design and functionality, their theme code may vary, too. You&#8217;re looking for the file for the header. A common name for it is <b>header.php<\/b>. If you can&#8217;t find it, contact your theme developer for help.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"960\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-Header.jpg\" alt=\"screenshot of the &quot;theme header&quot; code on the right-hand side of the file content code\" class=\"wp-image-42604 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-Header-300x180.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-Header-1024x614.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-Header-768x461.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Theme-Header-1536x922.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-600x360.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-1200x720.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-730x438.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-1460x876.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-784x470.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-1568x941.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Theme-Header-877x526.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/960;\" \/><\/figure>\n\n\n\n<p>Inside the header file, find the <code>&lt;head&gt;<\/code> and <code>&lt;\/head&gt;<\/code> tags. Copy the first code snippet for your container and paste it as high up in the <code>&lt;head&gt;<\/code> section as possible.<\/p>\n\n\n\n<p>Next, find the <code>&lt;body&gt;<\/code> tag. Copy the second code snippet for your container and paste it right after the opening <code>&lt;body&gt;<\/code> tag.<\/p>\n\n\n\n<p>Click \u201cUpdate File\u201d to save your changes.<\/p>\n\n\n\n<p>Go back to GTM and click \u201cPreview\u201d. This will open a new window to connect <a href=\"https:\/\/tagassistant.google.com\/\" target=\"_blank\" rel=\"noopener\">Google Tag Assistant<\/a> to your website. Enter your site URL and click \u201cConnect\u201d.<\/p>\n\n\n\n<p>A new window to your site will open, and Google Tag Assistant will notify you if the connection is successful. Once it\u2019s connected, click \u201cFinish\u201d, go back to the previous window, and click \u201cContinue\u201d. You should see &#8220;Google Container Found&#8221; at the top of the screen, which indicates that installation of GTM on your WordPress site is complete.<\/p>\n\n\n\n<p>Click the \u201cSubmit\u201d button. Enter the version name and click \u201cPublish\u201d.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-2\">#2: Use A Plugin To Install GTM<\/h3>\n\n\n\n<p>The second method for installing GTM on a WordPress site is using a plugin. This method doesn&#8217;t require you to edit your site&#8217;s source code, so it may be more suitable for beginners.<\/p>\n\n\n\n<p>A simple, free plugin to use for this is <a href=\"https:\/\/wordpress.org\/plugins\/wp-headers-and-footers\/\" target=\"_blank\" rel=\"noopener\">Insert Headers And Footers<\/a>. After creating your GTM account and setting up your container, here&#8217;s what to do:<\/p>\n\n\n\n<p>Go to your WordPress admin page. Navigate to \u201cPlugins\u201d, then \u201cAdd new\u201d, and search for &#8220;Install Headers and Footers.&#8221; Once you find it, click &#8220;Install Now.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"850\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Add-New-Plugin.jpg\" alt=\"screenshot of the &quot;plugins&quot; dropdown in the WP menu showing &quot;add new plugin&quot; as the second option\" class=\"wp-image-42605 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Add-New-Plugin-300x159.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Add-New-Plugin-1024x544.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Add-New-Plugin-768x408.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Add-New-Plugin-1536x816.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-600x319.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-1200x638.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-730x388.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-1460x776.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-784x417.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-1568x833.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Add-New-Plugin-877x466.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/850;\" \/><\/figure>\n\n\n\n<p>Go to \u201cSettings\u201d, then \u201cInsert Headers and Footers\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"1200\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/WP-Headers-and-Footers.jpg\" alt=\"settings dropdown in the WP menu showing &quot;WP headers and footers&quot; towards the bottom \" class=\"wp-image-42606 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/WP-Headers-and-Footers-300x225.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/WP-Headers-and-Footers-1024x768.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/WP-Headers-and-Footers-768x576.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/WP-Headers-and-Footers-1536x1152.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-600x450.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-1200x900.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-730x548.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-1460x1095.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-784x588.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-1568x1176.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/WP-Headers-and-Footers-877x658.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/1200;\" \/><\/figure>\n\n\n\n<p>Copy the code snippets from the boxes in your GTM account and paste them into the corresponding boxes in \u201cInsert Headers and Footers\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"871\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Scripts.jpg\" alt=\"screenshot of the &quot;scripts in header&quot; text field\" class=\"wp-image-42607 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Scripts-300x163.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Scripts-1024x557.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Scripts-768x418.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Scripts-1536x836.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-600x327.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-1200x653.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-730x397.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-1460x795.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-784x427.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-1568x854.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Scripts-877x477.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/871;\" \/><\/figure>\n\n\n\n<p>Click \u201cSave\u201d.<\/p>\n\n\n\n<h2 id=\"step-3\" class=\"wp-block-heading\">Step 3: Add A Tag<\/h2>\n\n\n\n<p>With Google Tag Manager code installed on your site, you\u2019re now ready to start adding tags. Tags can be used for a variety of purposes, from tracking website analytics to remarketing and conversion tracking. Here\u2019s how to add your first tag:<\/p>\n\n\n\n<p>Go to the Google Tag Manager dashboard (<a href=\"https:\/\/tagmanager.google.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/tagmanager.google.com\/<\/a>&nbsp; and select the Container Name you just created.<\/p>\n\n\n\n<p>Click on the \u201cAdd a new tag\u201d button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"550\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Tag-types.jpg\" alt=\"right-hand menu in the GTM menu that appears after adding &quot;add a new tag&quot; with different tag type options\" class=\"wp-image-42608 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Tag-types-300x103.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Tag-types-1024x352.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Tag-types-768x264.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Tag-types-1536x528.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-600x206.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-1200x413.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-730x251.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-1460x502.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-784x270.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-1568x539.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Tag-types-877x301.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/550;\" \/><\/figure>\n\n\n\n<p>If you&#8217;re just starting, you might want to create a <a href=\"https:\/\/www.dreamhost.com\/blog\/universal-analytics-to-ga4\/\" target=\"_blank\" rel=\"noopener\">Google Analytics<\/a> tracking tag. This is one of the most common ways to use GTM, and GA4 provides tons of ways to use tags to track real-time site data and metrics. For a GA4 tag, name it something descriptive like, &#8220;GA4&#8221; or &#8220;GA4 Configuration.&#8221;<\/p>\n\n\n\n<p>In the Tag Configuration box, select \u201cGoogle Tag\u201d<i>. <\/i>In the Tag ID field, enter your Google tag ID. Click \u201cSave\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"650\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Triggers.jpg\" alt=\"screenshot of the &quot;choose a trigger&quot; screen showing the options for all pages, consent initialization - all pages, and initialization - all pages\" class=\"wp-image-42609 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Triggers-300x122.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Triggers-1024x416.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Triggers-768x312.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Triggers-1536x624.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-600x244.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-1200x488.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-730x297.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-1460x593.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-784x319.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-1568x637.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Triggers-877x356.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/650;\" \/><\/figure>\n\n\n\n<p>After configuring your tag, you need to define when it will fire. Click on the &#8220;Triggering&#8221; section and choose a trigger. For example, to track all page views, you&#8217;ll select the &#8220;All Pages&#8221; trigger. Triggers can be as broad or as specific as you want \u2013 GTM gives you a lot of control.<\/p>\n\n\n\n<h2 id=\"step-4\" class=\"wp-block-heading\">Step 4: Verify GTM Is Installed &amp; Sending Data<\/h2>\n\n\n\n<p>Before you save and publish your tags, it&#8217;s crucial to ensure everything is working correctly. Here&#8217;s how you can verify that GTM is installed properly and the tags are sending data:<\/p>\n\n\n\n<p>GTM offers a built-in Preview mode that lets you see which tags are firing on your website. Click \u201cPreview\u201d on the GTM dashboard for your website, enter your website\u2019s URL, and then navigate to your site. You will see a debug window at the bottom of your site that shows which tags are firing and which are not.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"355\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Preview.jpg\" alt=\"screenshot of the tag manager &quot;preview&quot; option in the top right\" class=\"wp-image-42610 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Preview-300x67.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Preview-1024x227.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Preview-768x170.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/Preview-1536x341.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-600x133.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-1200x266.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-730x162.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-1460x324.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-784x174.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-1568x348.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/Preview-877x195.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/355;\" \/><\/figure>\n\n\n\n<p>Next, you can look for <a href=\"https:\/\/www.dreamhost.com\/blog\/ga4-realtime\/\" target=\"_blank\" rel=\"noopener\">real-time data in Google Analytics<\/a><b>. <\/b>If you\u2019ve set up a Google Analytics tag in GTM, go to your Google Analytics account and navigate to the Realtime report. If you see active users on your site (you may need to navigate around your site to generate data), this indicates that GTM is correctly sending data to Google Analytics.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1600\" height=\"838\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/realtime.jpg\" alt=\"screenshot of the &quot;Realtime&quot; GA report right under &quot;Reports snapshop&quot; in the menu\" class=\"wp-image-42611 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime.jpg.webp 1600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/realtime-300x157.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/realtime-1024x536.jpg 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/realtime-768x402.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/realtime-1536x804.jpg 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-600x314.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-1200x629.jpg.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-730x382.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-1460x765.jpg.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-784x411.jpg.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-1568x821.jpg.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/12\/realtime-877x459.jpg.webp 877w\" data-sizes=\"(max-width: 1600px) 100vw, 1600px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1600px; --smush-placeholder-aspect-ratio: 1600\/838;\" \/><\/figure>\n\n\n\n<p>For a more technical check, you can use your browser&#8217;s developer tools to inspect the network requests being made when a page on your site loads. Look for network calls to &#8216;google-analytics.com&#8217; or other relevant domains, which can confirm that tags are firing.<\/p>\n\n\n\n<p>By taking these steps, you\u2019ll be able to confidently confirm that Google Tag Manager is installed correctly and that your tags are collecting and sending data as expected. If there are any issues, the information provided by these verification methods can also help you troubleshoot any problems.<\/p>\n\n\n\n<h2 id=\"faqs\" class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I install Google Tag Manager on different kinds of sites?<\/h3>\n\n\n\n<p>Yes, Google Tag Manager can be installed on all types of websites, including those built with HTML, PHP, WordPress, Shopify, and other content management systems or e-commerce platforms.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I use a plugin for my CMS to install Google Tag Manager?<\/h3>\n\n\n\n<p>Absolutely. Many content management systems, like WordPress, have plugins available that make integrating Google Tag Manager easier. Just search for GTM plugins within your CMS\u2019s plugin repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where does the Google Tag Manager code go on my website?<\/h3>\n\n\n\n<p>The Google Tag Manager code snippet consists of two parts. The first part should be placed as close to the opening <code>&lt;head&gt;<\/code> tag as possible on every page, and the second part should be immediately after the opening <code>&lt;body&gt;<\/code> tag.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What&#8217;s the difference between Google Analytics and Google Tag Manager?<\/h3>\n\n\n\n<p>Google Analytics is a tool that collects and reports data about website traffic and user interactions. Google Tag Manager, on the other hand, is a tag management system that allows you to easily update and manage marketing tags (including Google Analytics tracking code) without changing the code on your website. Essentially, Google Analytics measures your site&#8217;s performance, while Google Tag Manager helps you streamline the process of deploying and managing the tags that collect the data.<\/p>\n\n\n\n\n\n<div\n\tclass=\"article-cta-shared article-cta-small\"\n>\n    <div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder-x2.webp 2x\"  alt=\"Ad background image\" \/><\/div>\n\n\n\n\n  <div class=\"content-btm\">\n    <h2\n      class=\"h2--md\"\n    >\n      Get More Visitors, Grow Your Business\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      Our marketing experts will help you earn more traffic and convert more website visitors so you can focus on running your business.\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/pro-services\/marketing\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Learn More                    <\/a>\n\n  <\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Google Tag Manager (GTM) is a powerful, free tool provided by Google that allows website owners and marketers to manage and deploy marketing tags (snippets of code or tracking pixels) on their website (or mobile app) without needing any coding skills. In other words, it&#8217;s a tag management system that enables you to quickly and [&hellip;]<\/p>\n","protected":false},"author":1060,"featured_media":42595,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"Want to easily manage tags and tracking codes? Follow these steps to install Google Tag Manager.","toc_headlines":"[[\"step-1\",\"Step 1: Create A Google Tag Manager Account\"],[\"step-2\",\"Step 2: Install Google Tag Manager Code On Your Site (2 Methods)\"],[\"step-3\",\"Step 3: Add A Tag\"],[\"step-4\",\"Step 4: Verify GTM Is Installed &amp; Sending Data\"],[\"faqs\",\"Frequently Asked Questions\"]]","hide_toc":false,"footnotes":""},"categories":[12840],"tags":[],"class_list":["post-42594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-marketing"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How To Install Google Tag Manager On Your Site - DreamHost<\/title>\n<meta name=\"description\" content=\"Want to easily manage tags and tracking codes? Follow these steps to install Google Tag Manager.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/\" \/>\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 &amp; Start Tracking Today\" \/>\n<meta property=\"og:description\" content=\"It\u2019s time for efficient web tracking. Read our easy guide on how to install Google Tag Manager. Start enhancing your website&#039;s analytics and tracking capabilities today with these actionable steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-13T15:00:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-22T04:22:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-SOCIAL-Image.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Brian Glassman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How To Install Google Tag Manager &amp; Start Tracking Today\" \/>\n<meta name=\"twitter:description\" content=\"It\u2019s time for efficient web tracking. Read our easy guide on how to install Google Tag Manager. Start enhancing your website&#039;s analytics and tracking capabilities today with these actionable steps.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Glassman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Install Google Tag Manager On Your Site - DreamHost","description":"Want to easily manage tags and tracking codes? Follow these steps to install Google Tag Manager.","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:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Google Tag Manager & Start Tracking Today","og_description":"It\u2019s time for efficient web tracking. Read our easy guide on how to install Google Tag Manager. Start enhancing your website's analytics and tracking capabilities today with these actionable steps.","og_url":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2023-12-13T15:00:26+00:00","article_modified_time":"2025-05-22T04:22:02+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-SOCIAL-Image.jpg","type":"image\/jpeg"}],"author":"Brian Glassman","twitter_card":"summary_large_image","twitter_title":"How To Install Google Tag Manager & Start Tracking Today","twitter_description":"It\u2019s time for efficient web tracking. Read our easy guide on how to install Google Tag Manager. Start enhancing your website's analytics and tracking capabilities today with these actionable steps.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Brian Glassman","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#article","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/"},"author":{"name":"Brian Glassman","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/e25c31f16fee80576bdd8b93a066f3de"},"headline":"How To Install Google Tag Manager On Your Site (Step-By-Step)","datePublished":"2023-12-13T15:00:26+00:00","dateModified":"2025-05-22T04:22:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/"},"wordCount":1873,"publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-HERO-Image.jpg","articleSection":["Marketing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/","name":"How To Install Google Tag Manager On Your Site - DreamHost","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#primaryimage"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-HERO-Image.jpg","datePublished":"2023-12-13T15:00:26+00:00","dateModified":"2025-05-22T04:22:02+00:00","description":"Want to easily manage tags and tracking codes? Follow these steps to install Google Tag Manager.","breadcrumb":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#primaryimage","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-HERO-Image.jpg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2023\/12\/How-To-Install-Google-Tag-Manager-HERO-Image.jpg","width":1460,"height":1095,"caption":"A colorful night sky above mountain tops background with photo of a man with headphones working on a laptop with a smile on his face and GTM icon in the corner"},{"@type":"BreadcrumbList","@id":"https:\/\/www-dev.dreamhost.com\/blog\/install-google-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dhblog.dream.press\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install Google Tag Manager On Your Site (Step-By-Step)"}]},{"@type":"WebSite","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website","url":"https:\/\/www-dev.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www-dev.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www-dev.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/e25c31f16fee80576bdd8b93a066f3de","name":"Brian Glassman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/01\/brian-glassman-dreamhost-150x150.jpg","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/01\/brian-glassman-dreamhost-150x150.jpg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/01\/brian-glassman-dreamhost-150x150.jpg","caption":"Brian Glassman"},"description":"SEO leader and content marketer, Brian is DreamHost\u2019s Director of SEO. Based in Chicago, Brian enjoys the local health food scene (deep dish pizza, Italian beef sandwiches) and famous year-round warm weather. Follow Brian on LinkedIn.","sameAs":["https:\/\/www.linkedin.com\/in\/brianglassmandesign\/"],"url":"https:\/\/www-dev.dreamhost.com\/blog\/author\/brian\/"}]}},"lang":"en","translations":{"en":42594,"es":42710,"de":51820,"pt":55779,"pl":55801,"ru":55856,"uk":55905,"it":68597,"fr":70786,"nl":70819},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1060"}],"replies":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/comments?post=42594"}],"version-history":[{"count":10,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42594\/revisions"}],"predecessor-version":[{"id":61427,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/42594\/revisions\/61427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/42595"}],"wp:attachment":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=42594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=42594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=42594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}