How to install Google Analytics for WordPress
Knowing how to install Google Analytics for WordPress is an important task for any site owner. Once you have completed your site, you might be left thinking, so, I have a website, but how do I see how much traffic I am getting?
For those unfamiliar with Google Analytics, it is a free-to-use service that allows you to collect traffic and user-related data for your site.
This is important for those wanting to monetise a blog or those that have an e-commerce store. Knowing where your users and potential customers have come from is important to know so that you can see what areas/regions your site is performing well in. It will also help you when you create advertising campaigns because you will have a clearer idea of who to target.
Creating an Analytics profile
To create a Google Analytics profile, you must first have a Google account. This can be your personal account or your business account. If you don’t have either, click here to get started https://support.google.com/accounts/answer/27441?hl=en
Otherwise, click here to create your Analytics account/profile.
Sign in with your Google account, as mentioned previously. You will now be asked to create an Analytics account. This allows you to assign properties to your account as well amend your settings and report filters. From there, you can now create a property. In this case, your property will be a website, but it could be a mobile app. Give your website a name, enter the URL and then select a site category, for example, ‘Computers and Electronics’.
Within your WordPress admin menu, select the Appearance menu > Theme Editor.
Within the Theme Editor, select the Theme Header(header.php) file under Theme Files. Take a backup if you wish. Editing theme files can potentially break your site, so if you are unsure as to what you are doing then please be careful and take precautions.
Within the <Head> tags, paste the gtag.js code within there.
It might take Google 24 + hours to index your page and to start tracking your site, but ultimately, this is one way to add tracking to your site. Please note, that this has to be repeated if you choose a new theme.
Alternatively, download the MonsterInsights plugin from the WordPress store. Once installed and activated, open the newly created Insights menu. Select Settings, and then select the Setup Wizard.
From the Wizard you determine what type of site you are wanting to track, and then you can link your Google Analytics account with the app – make sure you select the correct site when setting it up.
MontserInsights Google Analytics for WordPress
Once MonsterInsights has been set up you will be able to view the reporting options. Ideally, you will want to wait a week or two to let Google index your site, as well as creating enough data for you to analysis.
To show the reports, simply select Reports under the Insights menu heading. What I like about the MontserInsights Google Analytics for WordPress plugin is the user-interface; the look and feel of the reporting page. It is a lot less cluttered than the actual Google Analytics page, however, with the Google Analytics app (web and mobile) you do get more additional features. Not only that but most of the reports require a premium subscription for data that you can freely view in your Google Analytics account.
But what you can view is the overview report. You can view how much traffic your site has received in the past week or month, as well as the percentage breakdown of new and returning visitors and the devices used, i.e. Mobile and desktop. The overview report will also show you what pages are being hit, as well as the sources of traffic and which countries.
It is a very useful plugin to use and it does save you from having to log in or accessing your Google Analytics account. Just by viewing the basic information about your site’s performance you can see where you need to improve as well the things that you are doing well. I would still recommend logging into your Google Analytics account as it does give you a ton more features, without an extra cost, and not only that but you can also create your own custom reports. A topic for the future, perhaps…
Hopefully, this article has given you some idea into how to install Google Analytics for WordPress, and also why you need to use analytical data for your site. Any questions, please let me know!