{"id":63546,"date":"2020-08-24T14:25:08","date_gmt":"2020-08-24T14:25:08","guid":{"rendered":"https:\/\/rockcontent.com\/blog\/add-google-analytics-to-wordpress\/"},"modified":"2025-09-09T16:22:23","modified_gmt":"2025-09-09T19:22:23","slug":"add-google-analytics-to-wordpress","status":"publish","type":"post","link":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/","title":{"rendered":"Discover how to add Google Analytics to WordPress to improve your metrics!"},"content":{"rendered":"<p>So you don&#8217;t know how to add Google Analytics to <a href=\"https:\/\/pingback.com\/en\/resources\/wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"WordPress (opens in a new tab)\">WordPress<\/a> and want to do it now? Well, after reading this article you&#8217;ll have Analytics on your page.<\/p>\n<p>As a good marketer would say: &#8220;In God we trust, all others bring data!&#8221;. Monitoring and analyzing data has become something crucial to <strong>do a good job at <\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/pingback.com\/en\/resources\/digital-marketing-kpis\/\" target=\"_blank\"><strong>Marketing<\/strong><\/a>. Every day you have to rely on strategies to bring new people to your site or blog and convert them into leads.<\/p>\n<p>You usually invest in organic search, paid media, social media, <a href=\"https:\/\/pingback.com\/en\/resources\/email-marketing-guide\/\" rel=\"noreferrer noopener\" target=\"_blank\">email marketing<\/a>, and others.<\/p>\n<p>At the end of the day, you will want to know if your strategies worked, which one of them was the best and which one needs your attention next time, right?<\/p>\n<p>Well, the only way to be sure that you&#8217;re<strong> achieving excellent results for your brand <\/strong>and that your strategies are working well is by asking the numbers.<\/p>\n<p>For that, you can add Google Analytics to WordPress \u2014 Analytics is a free data analysis software by Google.<\/p>\n<p>Haven&#8217;t you set up Google Analytics for WordPress yet? No problem. Just keep reading to discover how to get started.&nbsp;<\/p>\n<p>Here&#8217;s what you&#8217;re going to see:<\/p>\n<ul class=\"wp-block-list\">\n<li><a href=\"#what\">What are the advantages of using Google Analytics?<\/a><\/li>\n<li><a href=\"#how\">How to add Google Analytics to WordPress?<\/a><\/li>\n<\/ul>\n<p><a id=\"what\"><\/a><\/p>\n<h2 class=\"wp-block-heading\"><strong>What are the advantages of using Google Analytics?<\/strong><\/h2>\n<p>Before we get into specifics regarding the process, it&#8217;s important that you properly understand what Google Analytics is and its benefits. Long story short, it&#8217;s a free software that provides several <strong>analysis parameters<\/strong> about your site.<\/p>\n<p>Some of the main advantages of using Google Analytics can be summarized as follows:<\/p>\n<ul class=\"wp-block-list\">\n<li>It&#8217;s a free tool<\/li>\n<li>You can conduct quantitative analysis (how many people visited, how long each session lasted)<\/li>\n<li>It&#8217;s also possible to check qualitative data (where people are coming from, which pages they visited)<\/li>\n<li>It&#8217;s also possible to create a <a href=\"https:\/\/pingback.com\/en\/resources\/digital-marketing-funnel\/\" rel=\"noreferrer noopener\" target=\"_blank\">conversion funnel<\/a> to see the <a href=\"https:\/\/pingback.com\/en\/resources\/interactive-content-roi\/\" rel=\"noreferrer noopener\" target=\"_blank\">ROI<\/a> of each action<\/li>\n<\/ul>\n<p>Now that you know how crucial Google Analytics is for your marketing strategy, follow the step-by-step instructions on how to add it to WordPress!<\/p>\n<p><a id=\"how\"><\/a><\/p>\n<h2 class=\"wp-block-heading\"><strong>How to add Google Analytics to WordPress?<\/strong><\/h2>\n<p>After creating an account on Analytics,<strong> you will need to install it on <\/strong><a href=\"https:\/\/pingback.com\/en\/resources\/wordpress-hosting\/\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>WordPress<\/strong><\/a> if you want to <a href=\"https:\/\/pingback.com\/en\/resources\/content-marketing-metrics\/\" rel=\"noreferrer noopener\" target=\"_blank\">keep track<\/a> of your site&#8217;s data.<\/p>\n<p>In this post, we will cover the two main ways of doing that \u2014 <a href=\"https:\/\/pingback.com\/en\/resources\/best-wordpress-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"using a plugin (opens in a new tab)\">using a plugin<\/a> and adding the code directly in the WordPress template. If you&#8217;re looking for an easy and quick process, a plugin should work best for you.&nbsp;<\/p>\n<p>But if you want to go for a manual approach, we recommend telling your developer to back up the site beforehand.&nbsp;<\/p>\n<p>For newer folks just jumping into WordPress in 2025, you might notice plenty of plugins promising analytics, insights, and everything in between. MonsterInsights has stuck around for a reason\u2014it\u2019s not only the most popular but also generally the least headache-inducing for beginners. But, sure, if you like testing boundaries (or just like torturing yourself with code), you can dabble in manual installation and make things as complicated as your heart desires.<\/p>\n<p>One thing that sometimes gets overlooked: Google Analytics doesn\u2019t just sit there counting visitors like an old-school web counter from the \u201890s. With tools like enhanced e-commerce tracking or event tracking, you can see which call-to-action actually gets clicked or if people bounce after five seconds of loading. Digging into this stuff opens up a whole different level of site optimization. It\u2019s kind of wild once you realize the detail you can see\u2014where your audience comes from, what makes them stick around, or what sends them running for the hills.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Step-by-step guide for installation via a plugin<\/strong><\/h3>\n<p><strong>The most popular WordPress plugin<\/strong> is MonsterInsights, and that&#8217;s the one we&#8217;re going to use in this guide. More than a million sites use that plugin, and its free version already provides Analytics and the functionalities you will need.<\/p>\n<p>The first step is to install and enable the plugin. To find it, you only need to log into your WordPress account and click on &#8220;plugins&#8221; on the left side of the dashboard.&nbsp;<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1023251688  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/1.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15539\" \/><\/figure>\n<\/div>\n<p>Then, you have to look for &#8220;MonsterInsights&#8221;:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1856631940  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/2.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15540\" \/><\/figure>\n<\/div>\n<p>Next, click on &#8220;Install Now&#8221; and on &#8220;Enable&#8221;. The plugin will display this page:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=752944612  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/3.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15541\" \/><\/figure>\n<\/div>\n<p>Select your website&#8217;s category \u2014 Business, Publisher, or E-commerce \u2014, then click on &#8220;Save and Continue&#8221;.<\/p>\n<p>Right after that page, you will see another one with a button to connect Analytics to WordPress. Click on it to proceed with the installation.&nbsp;<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=952143290  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/4.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15542\" \/><\/figure>\n<\/div>\n<p>After clicking on the button, the plugin will show you a login pop-up from Google. That&#8217;s when you should select your Google account that&#8217;s connected to Analytics. When you&#8217;re done with it, click &#8220;Allow&#8221;.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1696603885  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/5.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15543\" \/><\/figure>\n<\/div>\n<p>We&#8217;re almost there! Now, you have to select the site you want to monitor. Just type the domain and click &#8220;Complete Connection&#8221;.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1053319097  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/6.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15544\" \/><\/figure>\n<\/div>\n<p>MonsterInsights will ask you for some information about your website. You don&#8217;t need to worry about that at first \u2014 default settings usually work for most of the sites.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=422572580  data-opt-src=\"https:\/\/mlgzkyrbq6eh.i.optimole.com\/w:auto\/h:auto\/q:mauto\/https:\/\/pingback.com\/br\/resources\/wp-content\/uploads\/2021\/03\/wp-6.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-66474\" \/><\/figure>\n<\/div>\n<p>The next two pages offer optional resources, not associated with Analytics itself. The first of them presents other products and upgrades from MonsterInsights. The second talks about another plugin, the WPForms. To buy some time, you can skip all that.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1098635266  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/8.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15545\" \/><\/figure>\n<\/div>\n<p>There you go! With only a few clicks, Google Analytics is set up on your site. You will see this message:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1309766037  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/9.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15546\" \/><\/figure>\n<\/div>\n<p>The good news is if you want to see a report inside WordPress, now you can do that with MonsterInsights. Just access the &#8220;Insights&#8221; tab on the left side of the dashboard.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=922855625  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/10.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15547\" \/><\/figure>\n<\/div>\n<p>Weren&#8217;t you able to install Analytics with a plugin? Or do you prefer to do it another way?<\/p>\n<p>Don&#8217;t worry! We&#8217;re also going to teach you how to add Analytics to WordPress directly in the template code.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Step-by-step for installation via WordPress theme<\/strong><\/h3>\n<p>Before we begin, it&#8217;s important to mention that we&#8217;re going to do some coding. So, if you are not an expert on that, please talk to your developer to <strong>make sure that there&#8217;s a backup ready<\/strong>.<\/p>\n<p>As this process is manual, it&#8217;s also important to point out that you need to use an <a href=\"https:\/\/pingback.com\/en\/resources\/free-wordpress-themes\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"original WordPress theme (opens in a new tab)\">original WordPress theme<\/a> to keep the tracking code from disappearing whenever you update your template.&nbsp;<\/p>\n<p>The first thing you need is to access your <strong>Analytics account<\/strong> and click on the gear icon at the bottom left. After you&#8217;ve done that, click &#8220;<strong>tracking info<\/strong>&#8221; and then &#8220;<strong>tracking code<\/strong>&#8220;.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1699793717  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/11.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15548\" \/><\/figure>\n<\/div>\n<p>You will see this page:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=1212686022  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/12.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15549\" \/><\/figure>\n<\/div>\n<p>One of the many things you will see is the<strong> tracking code<\/strong>, which will send your site information to Google Analytics.<\/p>\n<p>Now, copy that, and let&#8217;s get back to WordPress and navigate to &#8220;Editor&#8221;, which is within the &#8220;<strong>Appearance<\/strong>&#8221; tab.&nbsp;<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=875676608  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/13.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15550\" \/><\/figure>\n<\/div>\n<p>Once you&#8217;re in the editor, let&#8217;s paste the code in the &#8220;<strong>header.php<\/strong>&#8221; file. You can find it on the right side of the screen.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img data-opt-id=334300430  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/14.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15551\" \/><\/figure>\n<\/div>\n<p>Have you already opened the header file? That means we&#8217;re getting there! Now, paste the code that you&#8217;ve just copied from Google Analytics.<\/p>\n<p>Important \u2014 this script should be pasted right <strong>before the &#8220;&lt;head&gt;&#8221; tag<\/strong>.<\/p>\n<figure class=\"wp-block-image size-large\"><img data-opt-id=1863535947  data-opt-src=\"https:\/\/s3.amazonaws.com\/scribblelive-com-prod\/wp-content\/uploads\/sites\/4\/2020\/08\/15.png\"  decoding=\"async\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20100%%20100%%22%20width%3D%22100%%22%20height%3D%22100%%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22100%%22%20height%3D%22100%%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" alt=\"\" class=\"wp-image-15552\" \/><\/figure>\n<p>Finally, click on &#8220;<strong>Update File<\/strong>&#8221; and you&#8217;re all set! Google Analytics will start tracking data on your site after that.<\/p>\n<p>We hope that this guide helps you add Google Analytics to WordPress successfully so you can start monitoring your site.\u00a0Now get the most out of your website with our <a href=\"https:\/\/resources.rockcontent.com\/ebook-google-analytics-guide?utm_source=referral&amp;utm_medium=rock-content-blog&amp;utm_campaign=add-google-analytics-to-wordpress\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">free, updated Google Analytics guide<\/a>.<\/p>\n<p>If you&#8217;re looking for more performance on your website you need to know how&#8217;s <a href=\"https:\/\/pingback.com\/en\/resources\/google-pagespeed-insights\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"your page speed (opens in a new tab)\">your page speed<\/a>. Put your URL below and get free insights on how to make your website faster!<\/p>\n<p> }}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding Google Analytics to WordPress is essential to check results or make strategic decisions. The setup process may seem a bit technical, but it\u2019s way simpler than what you imagine. We will break it down in this post. Check it out to learn more!<\/p>\n","protected":false},"author":1,"featured_media":56521,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-63546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to add Google Analytics to WordPress: a step-by-step guide<\/title>\n<meta name=\"description\" content=\"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add Google Analytics to WordPress: a step-by-step guide\" \/>\n<meta property=\"og:description\" content=\"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Pingback\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-24T14:25:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-09T19:22:23+00:00\" \/>\n<meta name=\"author\" content=\"Carolina\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carolina\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/\",\"url\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/\",\"name\":\"How to add Google Analytics to WordPress: a step-by-step guide\",\"isPartOf\":{\"@id\":\"https:\/\/pingback.com\/en\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2020-08-24T14:25:08+00:00\",\"dateModified\":\"2025-09-09T19:22:23+00:00\",\"author\":{\"@id\":\"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/5931a4533700c840b9f38199581abc33\"},\"description\":\"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.\",\"breadcrumb\":{\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/pingback.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Discover how to add Google Analytics to WordPress to improve your metrics!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/#website\",\"url\":\"https:\/\/pingback.com\/en\/resources\/\",\"name\":\"Pingback\",\"description\":\"Marketing for builders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pingback.com\/en\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/5931a4533700c840b9f38199581abc33\",\"name\":\"Carolina\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70cde532238b4f8bf4a6e7e589ff0a259eda38fa966564ca7ed7d23e61c27774?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70cde532238b4f8bf4a6e7e589ff0a259eda38fa966564ca7ed7d23e61c27774?s=96&d=mm&r=g\",\"caption\":\"Carolina\"},\"sameAs\":[\"https:\/\/pingback.com\"],\"url\":\"https:\/\/pingback.com\/en\/resources\/author\/adm1n\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add Google Analytics to WordPress: a step-by-step guide","description":"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.","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:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/","og_locale":"pt_BR","og_type":"article","og_title":"How to add Google Analytics to WordPress: a step-by-step guide","og_description":"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.","og_url":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/","og_site_name":"Pingback","article_published_time":"2020-08-24T14:25:08+00:00","article_modified_time":"2025-09-09T19:22:23+00:00","author":"Carolina","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Carolina","Est. tempo de leitura":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/","url":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/","name":"How to add Google Analytics to WordPress: a step-by-step guide","isPartOf":{"@id":"https:\/\/pingback.com\/en\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage"},"thumbnailUrl":"","datePublished":"2020-08-24T14:25:08+00:00","dateModified":"2025-09-09T19:22:23+00:00","author":{"@id":"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/5931a4533700c840b9f38199581abc33"},"description":"In this post you will find two easy ways to add Google Analytics to your WordPress so you can have better access to important metrics for your marketing.","breadcrumb":{"@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/pingback.com\/en\/resources\/add-google-analytics-to-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/pingback.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Discover how to add Google Analytics to WordPress to improve your metrics!"}]},{"@type":"WebSite","@id":"https:\/\/pingback.com\/en\/resources\/#website","url":"https:\/\/pingback.com\/en\/resources\/","name":"Pingback","description":"Marketing for builders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pingback.com\/en\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Person","@id":"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/5931a4533700c840b9f38199581abc33","name":"Carolina","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/pingback.com\/en\/resources\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/70cde532238b4f8bf4a6e7e589ff0a259eda38fa966564ca7ed7d23e61c27774?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70cde532238b4f8bf4a6e7e589ff0a259eda38fa966564ca7ed7d23e61c27774?s=96&d=mm&r=g","caption":"Carolina"},"sameAs":["https:\/\/pingback.com"],"url":"https:\/\/pingback.com\/en\/resources\/author\/adm1n\/"}]}},"_links":{"self":[{"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/posts\/63546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/comments?post=63546"}],"version-history":[{"count":3,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/posts\/63546\/revisions"}],"predecessor-version":[{"id":127606,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/posts\/63546\/revisions\/127606"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/media?parent=63546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/categories?post=63546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pingback.com\/en\/resources\/wp-json\/wp\/v2\/tags?post=63546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}