{"id":3811,"date":"2021-12-03T07:04:31","date_gmt":"2021-12-03T12:04:31","guid":{"rendered":"https:\/\/trustpulse.com\/?p=3811"},"modified":"2021-12-03T09:01:51","modified_gmt":"2021-12-03T14:01:51","slug":"how-to-add-google-analytics-to-wordpress","status":"publish","type":"post","link":"https:\/\/trustpulse.com\/2021\/12\/03\/how-to-add-google-analytics-to-wordpress\/","title":{"rendered":"How to Add Google Analytics to WordPress (Step by Step)"},"content":{"rendered":"
Do you want to learn how to add Google Analytics to WordPress?<\/p>\n
Using Google Analytics will give you real-time data that helps you understand how people interact with your website. Oh, and Google Analytics gives you this information for free<\/strong>.<\/p>\n The problem is, it’s not always straightforward to install or use this important tool.<\/p>\n Fortunately, it’s incredibly easy to add Google Analytics to WordPress using a plugin.<\/p>\n In this article, we will share why you should be adding Google Analytics to WordPress. Plus, we will walk you through how to add Google Analytics, step-by-step, both with and without a plugin.<\/p>\n Here’s a quick overview of the article, so you can easily navigate where you’d like.<\/p>\n As someone that runs a website and online business, your #1 goal is to pull in more traffic and sales.<\/p>\n If you don’t understand how visitors interact with your page and who is finding you, how can you reach this goal<\/a>?<\/p>\n Google Analytics is your best way to understand that and many other things about your site and visitors. This tool will help you identify your most popular pages, offers, and traffic sources. On the flip side, Google Analytics will help you pinpoint areas that aren’t resonating as well with your potential customers. Basically, it removes all the guesswork so you can get right into fixing the problem areas.<\/p>\n <\/p>\n Using Google Analytics, you can view data like:<\/p>\n <\/p>\n Google Analytics has what seems like an endless supply of data. So, chances are that if you have a question about your audience or site, Google Analytics can help you figure out the answer.<\/p>\n Without it, you are simply left guessing and wondering how your website marketing campaigns resonate with people.<\/p>\n So, you are probably wondering how you can tap into this fantastic resource and add it to your site.<\/p>\n With that in mind, let’s start the tutorial.<\/p>\n Before adding Google Analytics to our WordPress site, we need to create an account.<\/p>\n If you already have a Google account, like Gmail, you’ll need to sign in to set up Google Analytics.<\/p>\n First, you’ll need to navigate to the Google Analytics website<\/a>. There, click on the Start Measuring<\/strong> button.<\/p>\n <\/p>\n Google Analytics will prompt you to provide some additional information. To start, you’ll need to choose an account name and choose your account data sharing settings.<\/p>\n Click the Next<\/strong> button to move to the next step when you are done.<\/p>\n <\/p>\n Now, you will provide Property details<\/strong>. This is information specific to your website, like the name, local time zone, and local currency.<\/p>\n <\/p>\n Once you fill this out, click Show advanced options<\/strong>.<\/p>\n Now you need to enable the Create a Universal Analytics property<\/strong> option.<\/p>\n <\/p>\n After that, enter the URL of your website and make sure to select the Create a Universal Analytics property<\/strong> only<\/strong> option. This ensures you won’t have any issues connecting to MonsterInsights or other tracking platforms.<\/p>\n <\/p>\n Click Next<\/strong> when you’re done.<\/p>\n Finally, you will be filling out some information about your business. This helps Google Analytics tailor the data to your specific business and goals.<\/p>\n When finished, click\u00a0Create<\/strong>.<\/p>\n <\/p>\n Now, you’ll need to accept Google’s terms of the agreement. Click the checkboxes and then scroll to the bottom to find the I Accept <\/strong>button.<\/p>\n <\/p>\n Once done, the Google Analytics dashboard will open. Here, you’ll see 3 data stream options. For this, you’ll need to select the Web <\/strong>button.<\/p>\n <\/p>\n Next, enter your website’s URL and a stream name. Then, click on the Create Stream<\/strong>\u00a0button.<\/p>\n <\/p>\n Google will then create a measurement ID and stream ID, along with a tracking code.<\/p>\n You can find this tracking code under the Tagging instructions<\/strong> section. Open the Global Site Tag<\/strong> tab and copy this tracking code.<\/p>\n <\/p>\n Now, you’ll need to add this tracking code on your WordPress site to connect Google Analytics to your website.<\/p>\n Depending on how you go about adding Google Analytics to your site, it can be pretty tricky. However, we will be showing you an easier alternative that requires zero coding or technical knowledge.<\/p>\n We recommend going with method 1, which adds Google Analytics to WordPress by using a plugin. That’s because it’s the easiest way, and you won’t have to worry about editing any codes within your WordPress theme.<\/p>\n We’ll start with the simplest method for adding Google Analytics to WordPress.<\/p>\n For that, we’ll use the MonsterInsights<\/a> WordPress plugin.<\/p>\n <\/a><\/p>\n MonsterInsights<\/a> is the best Google Analytics WordPress plugin on the market. Not only does it let you add Google Analytics to your WordPress site, but it also makes accessing your data significantly easier.<\/p>\n Now, we know Google Analytics offers a lot of data. That’s a good thing. But, it can be overwhelming to sort through endless reports to find the exact data you need. With MonsterInsights, you can view the information you need right from your WordPress dashboard.<\/p>\n All you need to do is simply download and install the plugin.<\/p>\n <\/p>\n With MonsterInsights, you also get:<\/p>\n This is why MonsterInsights<\/a> has more than 3 million<\/strong> active installs and is the most popular Google Analytics plugin for WordPress.<\/p>\n Plus, MonsterInsights seamlessly integrates with both Universal Analytics and Google Analytics 4 (GA4). You can track whichever version you’re using or track both at the same time with the Dual Tracking feature.<\/p>\n Now, let’s dive right into how to add it to your site.<\/p>\n MonsterInsights is simple to add, and you’ll start by downloading the plugin.<\/p>\n First, you will need to either create or log in to your MonsterInsights account on the MonsterInsights website<\/a>.<\/p>\n <\/p>\n Then, click on the MonsterInsights\u00a0Downloads<\/strong>\u00a0tab.<\/p>\n <\/p>\n Now, you’ll need to download MonsterInsights. So, click on the large blue Download MonsterInsights<\/strong>\u00a0button next.<\/p>\n <\/p>\n Next, we’ll add it to your WordPress site. But first, you’ll need to remove any tracking codes or Google Analytics plugins<\/a> that may already be installed on your WordPress site.<\/p>\n Go ahead and log in to WordPress and make sure you are on the admin dashboard.<\/p>\n Navigate to\u00a0Plugins > Add New<\/strong>\u00a0and click on\u00a0Upload Plugin<\/strong>\u00a0at the top of the screen.<\/p>\n <\/p>\n Now, you’ll click on Choose File<\/strong>\u00a0to select the zip file you downloaded from the MonsterInsights site. Then, click on\u00a0Install Now<\/strong>\u00a0to both upload and install MonsterInsights.<\/p>\n <\/p>\n Once the MonsterInsights plugin is installed, you’ll need to activate it on your site. So, go ahead and click on Activate Plugin<\/strong>.<\/p>\n <\/p>\n Finally, you’ll need to enter your license key from the MonsterInsights My Account page<\/a>. Once you find it, copy the key.<\/p>\n <\/p>\n Moving back to your WordPress dashboard, navigate to\u00a0Insights > Settings<\/strong>\u00a0and paste your key in the\u00a0License Key<\/strong>. Finally, click on the\u00a0Verify Key<\/strong>\u00a0button.<\/p>\n <\/p>\n We’re now ready to connect Google Analytics to WordPress.<\/p>\n After activating the plugin, you’ll see the Insights tab in your dashboard.<\/p>\n Select it to open up the MonsterInsights dashboard, and inside, you’ll see the option to Launch Setup Wizard<\/strong>.<\/p>\n <\/p>\n MonsterInsights will now guide you through the process to connect Google Analytics.<\/p>\n You’ll be asked which category best describes your site on the next screen. Once you select a button, click on Save and Continue<\/strong>.<\/p>\n <\/p>\n Now, you’ll have a prompt to connect MonsterInsights, Google Analytics, and WordPress. Click on the blue button to proceed.<\/p>\n <\/p>\n A Google sign-in screen will pop up. Be sure you sign in to the same Google account you used to sign up for Google Analytics earlier in the tutorial. Click Allow<\/strong> to continue.<\/p>\n All that’s left to do is select your website from the next screen’s drop-down menu and click Complete Connection<\/strong>.<\/p>\n <\/p>\n And that’s all there is to it. Google Analytics is now running on your website.<\/p>\n If you have both a Universal Analytics property and a Google Analytics 4 property, you can also set up dual tracking with MonsterInsights. This will let you bring in all of your historical data and the familiar reports from Universal Analytics while giving you the benefits of GA4.<\/p>\n To set up dual tracking, go to the man Settings<\/strong> page. Scroll down to the Google Authentication<\/strong> section and find the Dual Tracking Profile<\/strong> box.<\/p>\n <\/p>\n Simply enter in either your Universal Analytics Tracking ID or your GA4 Measurement ID, whichever one you didn\u2019t authenticate in the setup wizard.<\/p>\n Ready to start tracking your site’s data and get a better understanding of how it’s performing? Get started with MonsterInsights today!<\/a><\/p>\n You can also add Google Analytics to WordPress without a plugin if you’d like. However, proceed carefully<\/strong> with this step, especially if you are unfamiliar with website coding. You’ll be editing your website theme, which could break your website.<\/p>\n You’ll also need to reenter the code any time you switch WordPress themes.<\/p>\n Any misstep here could lead to a blank or malfunctioning site. So before adding the Google Analytics code to your site, we highly suggest<\/strong> that you backup your site.<\/p>\n First, make sure you’ve copied the tracking code in your Google Analytics account.<\/p>\n <\/p>\n Now, head over to your WordPress dashboard.<\/p>\n From the dashboard, click Appearance<\/strong>. Next, click Theme Editor.<\/strong> If you don’t see this option, your security plugin or developer may have disabled it for you to secure your site from hackers. You’ll need to contact them to enable it.<\/p>\n <\/p>\n Inside the Theme Editor, from the left-hand menu, select Theme Header<\/strong>.<\/p>\n <\/p>\n Now, just before the closing head tag, paste the tracking code. Make sure you leave everything else as is.<\/p>\n <\/p>\n Exit the editor, and that’s it. You’ve added Google Analytics to your site.<\/p>\n Now, you’ll be able to track your site visitors and how they engage with your WordPress site.<\/p>\n And that’s all we have for you in this tutorial. We hope you’ve found this article helpful.<\/p>\n If you’d like even more resources to help you grow your business using your website, check out these articles:<\/p>\n Do you want to learn how to add Google Analytics to WordPress? Using Google Analytics will give you real-time data that helps you understand how people interact with your website. Oh, and Google Analytics gives you this information for free. The problem is, it’s not always straightforward to install or use this important tool. Fortunately,<\/p>\n","protected":false},"author":26,"featured_media":3853,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"limit_modified_date":"1","last_modified_date":"","om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[2022,2023,1486],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/posts\/3811"}],"collection":[{"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/comments?post=3811"}],"version-history":[{"count":33,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/posts\/3811\/revisions"}],"predecessor-version":[{"id":6763,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/posts\/3811\/revisions\/6763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/media\/3853"}],"wp:attachment":[{"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/media?parent=3811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/categories?post=3811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trustpulse.com\/wp-json\/wp\/v2\/tags?post=3811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
<\/span>Why Add Google Analytics to WordPress<\/span><\/h3>\n
\n
<\/span>Creating a Google Analytics Account<\/span><\/h3>\n
<\/span>Method 1: Installing Google Analytics Plugin on WordPress<\/span><\/h3>\n
\n
<\/span>Method 2: Adding Google Analytics to WordPress Without a Plugin<\/span><\/h3>\n
\n