{"id":59545,"date":"2021-03-03T07:39:27","date_gmt":"2021-03-03T07:39:27","guid":{"rendered":"https:\/\/www.vwthemes.com\/?p=59545"},"modified":"2023-04-17T10:14:16","modified_gmt":"2023-04-17T10:14:16","slug":"add-google-analytics-wordpress","status":"publish","type":"post","link":"https:\/\/preview.vwthemesdemo.com\/old_website\/add-google-analytics-wordpress\/","title":{"rendered":"Step by Step Guide to Set Up Google Analytics in WordPress 2023"},"content":{"rendered":"\n<p class=\"has-black-color has-text-color\">Are you curious about the different actions your users perform while visiting your site? If so, then Google offers you several tools to understand these activities. Among them, Google Analytics is a famously known tool. From tracking your website&#8217;s visitors to analyzing vital data, there is a lot you can do. Moreover, it is a free tool that is available for you to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-black-color has-text-color\" id=\"h-what-is-google-analytics\"><strong>What Is Google Analytics?<\/strong><\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Google Analytics is a Web Analytics Suite that actually helps the users to understand and analyze the web traffic of their websites. It tracks the different activities associated with the website and show in the form of statistics in Google Analytics account.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">From Google Analytics website owner come to know about visitors to our websites. Get details about which segment of users are visitors to your websites, how the visitors interact with the available content in the website, what they are doing with the content and how they are interacting with your website. This information helps website owners to understand the flaws and can direct them to optimize content.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">If you are thinking of how to add Google Analytics to WordPress, we are here to help you with step by step guide on adding Google Analytics to your WordPress site. These include creating an account, obtaining and adding a tracking code using numerous methods, and checking if the code is working. Without wasting time, let us get into it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-black-color has-text-color\"><strong>How to Create a Google Analytics Account<\/strong><\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Even if you lack a technical background, installing Google Analytics on your WordPress site will be a breeze. You can easily for the demonstrated steps. So, the first step is signing up for Google Analytics account. Signing Up for the Google Analytics is so simple. All you need is Google Account for it. If you don\u2019t have one, just make it. <\/p>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>Steps to Sign Up and Creating Google Analytics Account<\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">If you possess an existing Google account, you can start by entering your login details. If you do not have an existing account, you must initiate by clicking on the option &#8220;Create account\u201d. After entering your details regarding your name, password, email, contact number, etc., and creating a Google account, visit the homepage for Google Analytics.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Let us go over each step to help break down the process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once you navigate to the homepage of Google Analytics, select the blue button saying, \u201c<strong>Start measuring<\/strong>\u201d.<\/li>\n\n\n\n<li>You will find yourself on the page for Account setup.<\/li>\n\n\n\n<li>Enter your account name in the space for \u201c<strong>My New Account Name<\/strong>\u201d and check the options for \u201c<strong>Account Data Sharing<\/strong>\u201d.<\/li>\n\n\n\n<li>Select \u201c<strong>Next<\/strong>\u201d.<\/li>\n\n\n\n<li>The second step is Property Setup. It will help you select the reporting name, currency, and time zone.<\/li>\n\n\n\n<li>Enter the necessary information and select \u201c<strong>Next<\/strong>\u201d.<\/li>\n\n\n\n<li>Next is the form for \u201c<strong>About your business<\/strong>\u201d. You will have to check the options for business size, the aim of using Google Analytics for your business, and the industry category.<\/li>\n\n\n\n<li>Upon selecting \u201c<strong>Create<\/strong>\u201d, &#8220;Google Analytics Terms of Service Agreement&#8221; will pop up. Select &#8220;I Accept&#8221; after to say you agree with their terms. Doing so will create a Google Analytics account.<\/li>\n\n\n\n<li>In \u201c<strong>Data Streams<\/strong>\u201d, select the platform of your preference. For a WordPress site, select the \u201cWeb\u201d option.<\/li>\n\n\n\n<li>To &#8220;<strong>Set up your web stream<\/strong>\u201d, enter your \u201c<strong>Website URL<\/strong>\u201d and \u201c<strong>Stream Name<\/strong>\u201d and then select the \u201c<strong>Create Stream<\/strong>\u201d option.\u00a0<\/li>\n\n\n\n<li>The \u201cWeb stream details\u201d will display that you have successfully created a web stream. However, this does not mean that data collection is active. For this purpose, you must install \u201c<strong>Google Tag<\/strong>\u201d.<\/li>\n\n\n\n<li>For adding \u201c<strong>Google Tag<\/strong>\u201d, select \u201c<strong>View tag instructions<\/strong>\u201d. This will give you two options to &#8220;install with a website builder or CMS&#8221; or &#8220;<strong>install manually<\/strong>\u201d. Upon adding the tag, Google will begin data tracking to the dashboard of your Google Analytics account.\u00a0<\/li>\n<\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">This was all about creating an account. Now let us learn about the next step for adding Google Analytics to WordPress, i.e., obtaining tracking code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>Obtain Tracking Code<\/strong><strong><\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">If you wish to know everything regarding your website and track the behavior of your visitors, you can add Google Analytics to your WordPress site. But to do this, you will first need to obtain a tracking code. But what is a tracking code?<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">When we talk about web analytics, a JavaScript code snippet refers to as a tracking code. It can track your website visitor&#8217;s activity. Whenever a visitor comes to your website, the tracking code records how the visitor engages with the site or web page in the form of pseudonymous information.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">A tracking code can also collect data regarding the user&#8217;s browser type, language settings, device, and OS. It is the tracking code that lets you know what directed the visitors to your site, such as a web browser, email, advertisements, etc.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Generally, you will find two variations for the Google Analytics tracking code. These are UA or Google Universal Analytics and GA4 or Google Analytics 4. GA4 offers more adjustment options. The GA4 is for applications and websites, whereas UA works only with websites.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">To find the tracking code or ID for your Google Analytics, you can do as follows:<\/p>\n\n\n\n<p>For UA:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the account you created for Google Analytics.<\/li>\n\n\n\n<li>In your navigation sidebar, click on \u201cAdmin\u201d.<\/li>\n\n\n\n<li>From the second column, click \u201cTracking Info\u201d&gt; \u201cTracking Code\u201d.<\/li>\n\n\n\n<li>You will be able to see your tracking code on the right side of the new screen.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>Add Tracking Code to WordPress<\/strong><strong><\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">The next question is <strong>how to add Google Analytics code in WordPress<\/strong>. You can use four ways to add the tracking code to your website.<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-black-color has-text-color\"><strong>1. Adding tag code to the header.php<\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color\">It is possible to install Google Analytics to your WordPress site by copying and pasting the tracking code to your header.php file. You can do this as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit your WordPress site&#8217;s Dashboard.<\/li>\n\n\n\n<li>Go to &#8220;Appearance&#8221; and navigate to &#8220;Editor&#8221;.<\/li>\n\n\n\n<li>Select the file with \u201cheader.php\u201d for editing the code.<\/li>\n\n\n\n<li>Next, from your Google Analytics, copy the \u201cTracking Code\u201d.<\/li>\n\n\n\n<li>In your header.php file\u2019s code, paste the tracking coder before the tag for &lt;head&gt;.<\/li>\n\n\n\n<li>When completed, the installation can take up to 48 hours for a complete activation.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading has-black-color has-text-color\"><strong>2. WordPress Plugin for Installing Google Analytics&nbsp;<\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color\">To install Google Analytics, the simplest alternative is WordPress plugins. You may use this option in case the first method is not possible because of your theme. For this purpose, you will have to install a WordPress plugin for Google Analytics. There are several solutions available for WordPress plugins. Some of these include:<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-black-color has-text-color\"><strong>GA Google Analytics: <\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color\">A robust and well-coded plugin for your website is GA Google Analytics. To install this plugin, you must:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit your Dashboard on WordPress.<\/li>\n\n\n\n<li>From here, navigate to \u201cPlugins\u201d and select \u201cAdd New\u201d.<\/li>\n\n\n\n<li>Search for \u201cGA Google Analytics\u201d and \u201cInstall Now\u201d.<\/li>\n\n\n\n<li>Finally, \u201cActivate\u201d it and configure it.<\/li>\n\n\n\n<li>Revisit the Dashboard, and in &#8220;Settings&#8221;, select &#8220;Google Analytics\u201d.<\/li>\n\n\n\n<li>Go to \u201cPlugins Settings\u201d and paste your \u201cTracking ID\u201d.<\/li>\n\n\n\n<li>Check the boxes for \u201cUniversal Analytics\u201d and \u201cInclude tracking code in page head\u201d. These options will set up your Google Analytics on your site.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading has-black-color has-text-color\"><strong>MonsterInsights: <\/strong><\/h5>\n\n\n\n<p class=\"has-black-color has-text-color\">Another popular WordPress plugin for Google Analytics is MonsterInsigts. It is a popular choice among its users, given its user-friendliness. To install this plugin, follow the same steps as before. After activation, you can move to the plugin settings to link it with your account.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Next, follow the given steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the &#8220;Connect MonsterInsights &amp; Setup Web Analytics\u201d options to run the setup for this plugin.<\/li>\n\n\n\n<li>Choose the best category for your website.<\/li>\n\n\n\n<li>You will not need a license unless you are using a pro version.<\/li>\n\n\n\n<li>The next step is to connect and authenticate your account with the plugin.<\/li>\n\n\n\n<li>Once done, select \u201cSave &amp; Continue\u201d.<\/li>\n\n\n\n<li>The plugin will require some time to fetch information and showcase the live tracking in your dashboard after completing the setup.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading has-black-color has-text-color\"><strong>3. Google Tag Manager for Adding Google Analytics<\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color\">When you are thinking of <strong>how to add Google Analytics to WordPress<\/strong>, you cannot miss this method of using GTA or Google Tag Manager.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After visiting your dashboard, select \u201cPlugins\u201d and \u201cAdd New\u201d.<\/li>\n\n\n\n<li>In the search field, enter \u201cGoogle Tag Manager\u201d.<\/li>\n\n\n\n<li>Install &gt; Activate<\/li>\n\n\n\n<li>Navigate to GTA and select \u201cCreate Account\u201d to sign up.<\/li>\n\n\n\n<li>Enter your details, such as container name, country, and account name and select \u201cCreate\u201d.<\/li>\n\n\n\n<li>&nbsp;<\/li>\n\n\n\n<li>After signing up, you will find the GTA snippets.<\/li>\n\n\n\n<li>Select \u201cOk\u201d and get the \u201cGoogle Tag Manager ID\u201d.<\/li>\n\n\n\n<li>Finally, paste your ID in the plugin&#8217;s setting and &#8220;Save Changes&#8221; to successfully add Google Analytics.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. Local Hosting<\/strong><\/h4>\n\n\n\n<p class=\"has-black-color has-text-color\">Lastly, if none of the above methods works for you, you can use local hosting. To reduce HTTP requests and better performance, you can choose to locally host your Google Analytics. You can use a lightweight WordPress plugin for this, such as CAOS or a complete analytics optimization suite.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Head to the dashboard, select &#8220;Plugins&#8221;, and find CAOS.<\/li>\n\n\n\n<li>After the plugin installation and activation, visit the plugin&#8217;s settings.<\/li>\n\n\n\n<li>Paste your Google Analytics Code and choose a location for placing your tracking script.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>Verify Google Analytics Is Working<\/strong><strong><\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">If you have completed your GA integration with your site, the following step involves verifying whether your GA is working efficiently or not. Firstly, after the completion of setup and placing your Analytics tag, give it 15-30 minutes.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">Next, you can verify your Google Analytics working by following these steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit your Google Analytics account.<\/li>\n\n\n\n<li>Select &#8220;Realtime&#8221; and open &#8220;Overview\u201d.<\/li>\n\n\n\n<li>Go to any WordPress site page.<\/li>\n\n\n\n<li>If the GA is working efficiently, a bar will be visible to show the data of your WordPress site goes well in the GA.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-black-color has-text-color\">Some common issues arise when tracking data for your WordPress site in your GA. These include:<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\"><strong>No traffic: <\/strong>If your website lacks traffic, no data will be visible on your GA reports. For this, you can try interacting with your site and check whether the \u201cRealtime\u201d report displays this activity.&nbsp;<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\"><strong>No data processing: <\/strong>For first-time installers, GA takes around 24 hours to process your website data. In addition, if your website lacks users, GA can apply thresholds to keep your user&#8217;s identity safe. You can check for these thresholds.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><strong><\/strong><\/h2>\n\n\n\n<p class=\"has-black-color has-text-color\">Google Analytics is vital for your website as it gives you an insight into its performance. It allows tracking your users and how they interact with your website. You can better understand your website visitors and develop better strategies for marketing and website customization.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">To add your GA to your WordPress, you will first have to create an account on Google Analytics. Then find and add tracking code to your WordPress. For adding code, you can use different methods, including plugins, GTA, header.php and local hosting. Once completed, verify the successful working of your Google Analytics.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">If you want to get the best from your website data and enhance your KPIs, you must evaluate your audience based on their age and gender and create targeted content. Put your conversions on top and measure them to link them to your website content\u2019s success. You can also do many other things to ensure your website works efficiently.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-black-color has-text-color\"><strong>FAQs on Adding Google Analytics to WordPress<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>Can I use Google Analytics to track multiple websites?<\/strong><strong><\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">Yes, it is possible to keep track of numerous sites using one account and adding them to Google Analytics. To do this, you can use two ways. The first method involves adding all the sites as separate properties under one account. The second method involves adding a special Analytics ID to separate websites.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>What are the benefits of using Google Analytics on a Website?<\/strong><strong><\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">Website owners can enjoy a range of benefits with Google Analytics. It works towards supporting your <a href=\"https:\/\/www.vwthemes.com\/wordpress-seo-optimization-checklist\/\" target=\"_blank\" rel=\"noreferrer noopener\">website&#8217;s SEO optimization<\/a> and helps track how well your efforts work. It allows you to compare traffic for various keywords and build better marketing campaigns.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">In addition to this, it allows website optimization to reduce bounce rates. You will get the option to shift to a specific location that is imperative to your business. As a result, you can get to know your prospects better. Google Analytics also enable you to distinguish your users depending on their location, visiting frequency, and referral routes. And these are only a few of the many benefits it has to offer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-black-color has-text-color\"><strong>What should I do if I encounter issues while adding Google Analytics to WordPress?<\/strong><\/h3>\n\n\n\n<p class=\"has-black-color has-text-color\">If you encounter any issues with your tag setup, it is imperative to troubleshoot them. These issues arise when the measurement code is not added to your site, incorrect measurement code installation, no website traffic, and no data processing. To fix issues, you can check for these problems. Additionally, you can head to support.google.com for Analytics Help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you curious about the different actions your users perform while visiting your site? If so, then Google offers you several tools to understand these activities. Among them, Google Analytics is a famously known tool. From tracking your website&#8217;s visitors to analyzing vital data, there is a lot you can do. Moreover, it is a [&hellip;]<\/p>\n","protected":false},"author":9250,"featured_media":59546,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-59545","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-about-wp-themes"],"_links":{"self":[{"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/posts\/59545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/users\/9250"}],"replies":[{"embeddable":true,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/comments?post=59545"}],"version-history":[{"count":5,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/posts\/59545\/revisions"}],"predecessor-version":[{"id":91983,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/posts\/59545\/revisions\/91983"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/media\/59546"}],"wp:attachment":[{"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/media?parent=59545"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/categories?post=59545"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/preview.vwthemesdemo.com\/old_website\/wp-json\/wp\/v2\/tags?post=59545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}