{"id":33544,"date":"2018-01-08T14:26:08","date_gmt":"2018-01-08T20:26:08","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=33544"},"modified":"2025-05-13T15:45:10","modified_gmt":"2025-05-13T20:45:10","slug":"wordpress-google-analytics-tag-manager","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/","title":{"rendered":"Google Analytics &amp; Tag Manager for WordPress"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"400\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag.jpg\" alt=\"Google analytics and Tag Manager\" class=\"wp-image-33545\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag.jpg 1100w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag-300x109.jpg 300w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag-768x279.jpg 768w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag-1024x372.jpg 1024w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">To drive targeted traffic to your website, and to keep the traffic you currently have, it&#8217;s important that your site caters to your audience&#8217;s needs. However, understanding exactly what your audience needs can be difficult without the right <\/span><span style=\"font-weight: 400\">tracking info<\/span><span style=\"font-weight: 400\">.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">Fortunately, <\/span><a href=\"https:\/\/analytics.google.com\/analytics\/web\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Google Analytics<\/span><\/a><span style=\"font-weight: 400\"> is a tool that enables you to collect user data and use it to your (and your <\/span><span style=\"font-weight: 400\">visitors&#8217;<\/span> <span style=\"font-weight: 400\">advantage). By implementing what you learn on your website, you can then improve user engagement and boost traffic.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">In this post, we&#8217;ll introduce you to<\/span> <span style=\"font-weight: 400\">installing <\/span><span style=\"font-weight: 400\">Google Analytics<\/span> <span style=\"font-weight: 400\">on <\/span><span style=\"font-weight: 400\">WordPress <\/span><span style=\"font-weight: 400\">manually<\/span><span style=\"font-weight: 400\">. This will include a look at how to <\/span><span style=\"font-weight: 400\">integrate Google Analytics<\/span> <span style=\"font-weight: 400\">on your website with and without <\/span><span style=\"font-weight: 400\">any <\/span><span style=\"font-weight: 400\">WordPress plugin<\/span><span style=\"font-weight: 400\">. You&#8217;ll also learn how Google Analytics and <\/span><a href=\"https:\/\/www.google.com\/analytics\/tag-manager\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Tag Manager<\/span><\/a><span style=\"font-weight: 400\"> work effortlessly together, and how to install both on your site.<\/span><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Google Analytics for WordPress<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/analytics.google.com\/analytics\/web\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Google Analytics<\/span><\/a><span style=\"font-weight: 400\"> is a web analytics service that launched in 2005. When connected to your website, it can collect user data including demographics and behavior, so you can better understand (and cater to) your <\/span><span style=\"font-weight: 400\">website <\/span><span style=\"font-weight: 400\">visitors<\/span><span style=\"font-weight: 400\">.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">Fortunately, Google Analytics and WordPress work seamlessly together. This means you can collect all the data you need, then optimize your WordPress site based on <\/span><span style=\"font-weight: 400\">your G<\/span><span style=\"font-weight: 400\">oogle Analytics report<\/span><span style=\"font-weight: 400\">.<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Add Google Analytics to WordPress<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Within WordPress, there are two main ways to add Google Analytics to your WordPress website. One is with the use of a WordPress plugin, and the other is without. Let\u2019s take a closer look at both options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Add Google Analytics with WordPress Plugins<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">One of the easiest ways to add Google Analytics to WordPress is with plugins. This is a great option for those who only need a \u2018basic\u2019 installation, or who aren\u2019t technologically savvy.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Google Analytics WordPress Plugins<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The first plugin\u2014and one of the most popular\u2014is <a href=\"https:\/\/wordpress.org\/plugins\/google-analytics-for-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Analytics for WordPress<\/a> by MonsterInsights. While this plugin has <a href=\"https:\/\/www.monsterinsights.com\/how-to-properly-setup-google-analytics-in-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">a potentially lengthy setup process<\/a>, there\u2019s no need to edit your WordPress Google Analytics code. As such, it\u2019s a great option for beginners:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"203\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag2.jpg\" alt=\"Google analytics for WordPress plugin\" class=\"wp-image-33546\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag2.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag2-300x97.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">Another popular plugin choice is <\/span><a href=\"https:\/\/wordpress.org\/plugins\/google-analytics-dashboard-for-wp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">Google Analytics Dashboard for WP (GADWP)<\/span><\/a><span style=\"font-weight: 400\">. <\/span><span style=\"font-weight: 400\">The Go<\/span><span style=\"font-weight: 400\">ogle Analytics Dashboard plugin<\/span> <span style=\"font-weight: 400\">makes it <\/span><a href=\"https:\/\/deconf.com\/google-analytics-dashboard-wordpress\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">simple to install Google Analytics<\/span><\/a><span style=\"font-weight: 400\"> on each page of your website (with the plugin&#8217;s <\/span><span style=\"font-weight: 400\">tracking <\/span><span style=\"font-weight: 400\">info<\/span> <span style=\"font-weight: 400\">component), and will also help you to read the collected data:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"217\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag3.jpg\" alt=\"Google Analytics Dashboard for WordPress plugin\" class=\"wp-image-33547\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag3.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag3-300x103.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">While there may be easier options, they aren\u2019t always the best. Let\u2019s look at another way to add Google Analytics to your WordPress website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Add Google Analytics without WordPress Plugins<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The other way to add Google Analytics to your website is through <a href=\"https:\/\/www.monsterinsights.com\/how-to-add-google-analytics-to-wordpress-without-a-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener\">adding Google Analytics&#8217; tracking code manually<\/a>. The simplest way is to add it via the dashboard\u2019s <em>Appearance<\/em> &gt; <em>Editor<\/em> screen. This requires some HTML knowledge, but it\u2019s not difficult.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Where to Put Google Analytics Tracking Code in WordPress<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Simply put, the tracking code can be placed just about anywhere on your website, including the head, body, and footer. However, there are some pros and cons to each option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you place your tracking code at the very top of the HTML &lt;<em>head<\/em>&gt; section, the code will be executed almost immediately as the user lands on the page. This is where <a href=\"https:\/\/developers.google.com\/analytics\/devguides\/collection\/gtagjs\" target=\"_blank\" rel=\"noopener noreferrer\">Google<\/a> recommends placing the code:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"121\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag4.jpg\" alt=\"add google analytics to wordpress without plugins\" class=\"wp-image-33548\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag4.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag4-300x58.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, placing the code at the end of your HTML will mean it\u2019s executed after all other code on the page. If a user leaves your website (or page) before the code has been executed, no data will be collected:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"216\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag5.jpg\" alt=\"steps to add google analytics to wordpress\" class=\"wp-image-33549\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag5.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag5-300x103.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As you might imagine, placing the tracking code in the &lt;<em>body<\/em>&gt; section will mean the code could be executed at any point during the page load. You won\u2019t collect the data of users who bounce quickly from the page, but you\u2019ll collect more than if it was at the end of the HTML:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"228\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag6.jpg\" alt=\"how to add google analytics to wordpress\" class=\"wp-image-33550\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag6.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag6-300x109.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There is no right or wrong place for the code, so the decision is yours. Consider exactly what you\u2019d like to track, then place the tracking code accordingly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Google Tag Manager for WordPress<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In simplest terms, <a href=\"https:\/\/www.google.com\/analytics\/tag-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Tag Manager<\/a> is a system that manages JavaScript and HTML codes used for tracking and analytics. When used with WordPress, you can very easily add Google Analytics (and other Google products) to your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Perhaps best of all, Google Tag Manager is a scalable solution for all websites, especially enterprise-level sites. This means it\u2019ll continue to work for you, even as your site grows.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Install Google Tag Manager for WordPress<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Installing Google Tag Manager in WordPress is a simple three-step process. To begin, head over to the <a href=\"https:\/\/www.google.com\/analytics\/tag-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tag Manager home page<\/a> and sign up (or sign in with your current Google Analytics account):<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"209\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag7.jpg\" alt=\"install google tag manager for wordpress\" class=\"wp-image-33551\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag7.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag7-300x100.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">Here, you&#8217;ll be asked to name your <\/span><span style=\"font-weight: 400\">Google <\/span><span style=\"font-weight: 400\">account <\/span><span style=\"font-weight: 400\">(we recommend using your company name) and your <em>Container<\/em>. In this case, your <\/span><a href=\"https:\/\/wpengine.com\/resources\/http-vs-www-urls-for-seo\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400\">website&#8217;s URL<\/span><\/a><span style=\"font-weight: 400\">:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"229\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag8.jpg\" alt=\"how to add google tag manager to wordpress\" class=\"wp-image-33552\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag8.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag8-300x109.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve set up your account, you\u2019ll be given two separate codes:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"422\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag9.jpg\" alt=\"install google tag manager onto wordpress\" class=\"wp-image-33553\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag9.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag9-300x201.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the first code, and head to your WordPress dashboard. Go to <em>Appearance<\/em> &gt; <em>Editor,<\/em> and you\u2019ll see a list of different files on the right side. Select <em>theme<\/em> <em>header.php<\/em>. Find the &lt;<em>head<\/em>&gt; element within the file, and paste the first part of the Tag Manager code directly below it:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"174\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag10.jpg\" alt=\"google tag manager for wordpress\" class=\"wp-image-33554\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag10.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag10-300x83.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Go back to Tag Manager, and copy the second (i.e. bottom) code. Once again return to your website, and paste this code right after the opening &lt;<em>body<\/em>&gt; element:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"83\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag11.jpg\" alt=\"steps to install google tag manager for wordpress\" class=\"wp-image-33555\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag11.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag11-300x40.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click <em>Update File<\/em> and you should see a confirmation appear. That\u2019s it\u2014you\u2019ve successfully added Tag Manager to your WordPress site!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Install Google Analytics Through Google Tag Manager<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-weight: 400\">Once Google Tag Manager is successfully installed, it&#8217;s time to install and use Google Analytics. When completed, Google Analytics will \u201cfunnel\u201d through Google Tag Manager on your website.<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, once it\u2019s set up, you don\u2019t even have to add analytics code to your site. To begin, go back to your Tag Manager account and click <em>New Tag<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"246\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag12.jpg\" alt=\"Install google analytics through tag manager\" class=\"wp-image-33556\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag12.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag12-300x117.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll now have two separate boxes: <em>Tag Configuration and Triggering<\/em>. Click <em>Tag type<\/em> in the <em>Tag Configuration<\/em> box and select <em>Universal Analytics<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"177\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag13.jpg\" alt=\"how to install google analytics on wordpress with tag manager\" class=\"wp-image-33557\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag13.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag13-300x84.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ll also need to configure the <em>Google Analytics Settings<\/em>. You can do this independently, or <a href=\"https:\/\/support.google.com\/tagmanager\/answer\/6107124#override\" target=\"_blank\" rel=\"noreferrer noopener\">set an override option<\/a>. Both of these require your Analytics <a href=\"https:\/\/support.google.com\/analytics\/answer\/1008080?visit_id=1-636487845075132391-1387959027&amp;rd=1\" target=\"_blank\" rel=\"noreferrer noopener\">Tracking ID<\/a>. <span style=\"font-weight: 400\">Once your Google Analytics tracking ID is configured, move on to <em>Triggering<\/em> . For <em>Page View<\/em>, you&#8217;ll want to select <em>All Pages.<\/em><\/span><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"388\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag14.jpg\" alt=\"Use tag manager to install google analytics on wordpress\" class=\"wp-image-33558\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag14.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag14-300x185.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This very last step is crucial, because otherwise the tag will not be published. On the Tag Manager account page, click <em>SUBMIT<\/em> in the top right corner. Add a <em>Version Name<\/em> and <em>Description<\/em>, and then be sure your new GA tag is showing under <em>Workspace Changes<\/em>. Once you\u2019ve verified, click <em>PUBLISH<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"107\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/GAandTag15.jpg\" alt=\"add google analytics to wordpress with tag manager\" class=\"wp-image-33559\" srcset=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag15.jpg 630w, https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag15-300x51.jpg 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With your Google Analytics tag now configured and published, Google Tag Manager will implement the tag on your website. In no time at all, your Google Analytics account will begin to collect user data, which you can then use to optimize your website for your audience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To optimize your website even further, consider <a href=\"https:\/\/wpengine.com\/managed-wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WP Engine\u2019s managed hosting plans for WordPress<\/a>. With quality <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a>, you can be sure your website is always running as smoothly as possible. Get started today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To drive targeted traffic to your website, and to keep the traffic you currently have, it&#8217;s important that your site caters to your audience&#8217;s needs. However, understanding exactly what your audience needs can be difficult without the right tracking info. Fortunately, Google Analytics is a tool that enables you to collect user data and use<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":177,"featured_media":0,"template":"","resource-topic":[913],"resource-role":[906,903,899],"resource-type":[916],"class_list":["post-33544","resource","type-resource","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Google Analytics &amp; Tag Manager for WordPress | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Analytics &amp; Tag Manager for WordPress | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-13T20:45:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/\",\"name\":\"Google Analytics & Tag Manager for WordPress | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2018-01-08T20:26:08+00:00\",\"dateModified\":\"2025-05-13T20:45:10+00:00\",\"description\":\"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Google Analytics &amp; Tag Manager for WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad\",\"name\":\"Samantha Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"caption\":\"Samantha Rodriguez\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Analytics & Tag Manager for WordPress | WP Engine\u00ae","description":"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Google Analytics & Tag Manager for WordPress | WP Engine\u00ae","og_description":"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2025-05-13T20:45:10+00:00","og_image":[{"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/GAandTag.jpg"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/","name":"Google Analytics & Tag Manager for WordPress | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2018-01-08T20:26:08+00:00","dateModified":"2025-05-13T20:45:10+00:00","description":"Learn how to install Google Analytics tracking code on your WordPress site, including how to easily do it with Google Tag Manager and plugins!","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-google-analytics-tag-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"Google Analytics &amp; Tag Manager for WordPress"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad","name":"Samantha Rodriguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","caption":"Samantha Rodriguez"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2017\/12\/Untitled-design-6.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Entrepreneur, Marketer, Site Owner","topic":"<strong>Topics:<\/strong> Analytics","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/33544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/177"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=33544"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=33544"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=33544"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=33544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}