Installing Google Analytics & Google Search Console

Affiliate Marketing For Beginners Part 4 | Google Analytics & Google Search Console

In the last article, we finished the hosting setup and enabled SSL and Cloudways CDN on your new WordPress site. For the other pages in this series go to the Affiliate Marketing for Beginners main page.

In this article, we will set up Google Analytics and Google Search Console. These tools, which are free, will tell you which pages on your site are performing the best, your worst pages, slow pages.

These tools can tell you exactly what you need to be working on and can help guide you in making important decisions like which topic you should be writing about next.

Reasons For Using Google Analytics & Google Search Console

  1. See where people come from when they visit your site
  2. Track what people do on your site, the pages they visit and the actions they take
  3. See the types of people, like age range, male/female, where they are in the world
  4. Find which browser they are using, mobile, tablet desktop and the actual screen size
  5. Allows you to track conversions
  6. Many data points available for as many different reports as you can think of

How to add Google Analytics to Your Website

First you need to visit Google Analytics sign up.

Enter your Google account information to sign up. Sign in with your Google or Gmail account if you already have one. If not, you can create a new Gmail account now.

You will be prompted with a screen like the one below once you sign in with your Gmail account.

To get started, you’ll need an account name. You can use any name you like as this will be used internally.

Following that, you can choose between web, apps, and apps and web. Select ‘Web’.

Then you’ll need to fill in the website’s name, URL, country, and time zone.

After entering this information, click the Next button. You will be presented with Google Analytics terms and services which you must agree to, so click on the ‘I Agree’ button.

You will now see your tracking code for Google Analytics. This tracking code can be copied since you will have to paste it into your WordPress site.

Leave the analytics browser tab open as you may need to go back in a bit.

Now that you have setup a Google Analytics account, let’s look at how to install Google Analytics in WordPress.
Once you’ve created a Google Analytics account, let’s move on to learning how to install Google Analytics on WordPress.
How to add your Google Analytics (GA) code into WordPress

There are multiple ways to do this, but we will only show the best method for adding Google Analytics Code to your website. The other methods add workload to your website which harms your visibility in the Google search results.

Add the Insert Headers and Footers Plugin, by clicking Plugins > Add New > Type headers in the search box.

Its the 3rd option in the list.

install and activate the Insert Headers and Footers plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics tracking code that you copied earlier into the ‘Scripts in headers’ section.

Next go to Settings > Insert Headers & Footers.

Copy your Google Analytics tracking code from the other tab.

Paste the code into the first box, which is Scripts in Header


Click on the save changes button

Finally, browse to the front end of your site and then go back into Google Analytics > Real time. After a few seconds you should Google Analytics starting to track you.

Congratulations you have now added your website to Google Analytics and confirmed it is working.

Google Analytics can show you enormous amounts of data collected from your visitors, which will help you perfect your new website to keep growing. But that’s for another day.

You will see the built-in Google Analytics reports in the left column. Each section is divided into different tabs and clicking on a tab will expand it to show more options.

Real-time This report will show you a real-time view of your traffic.

Audience tab will show reports to help you understand your users.

Acquisition reports explore where your users came from.

Behavior reports summarize what your users do after they arrive on your site.

Conversion reports show how well you’re doing against your goals.

How to add Google Search Console to Your Website

Google Search Console is a valuable and important SEO tool. The Google search console is a free, webmaster-oriented tool provided by Google.

You can consult the Google search console to learn what Google knows about your website, improve the performance of your site in search results, and troubleshoot issues.

The purpose of this post is to teach you how to add your website to Google Search Console.

Google Search Console: How to get your site listed

You should start by registering with Google Search Console and submitting and verifying your website ownership.

Step 1: Register with Google Search Console

Go to Google Search Console and click Start Now

You can use the same gmail account again here. It’s always a good idea to keep your Google search console and analytics accounts on the same Google account.

Step 2: Add your website

Add Property to Google Search Console

Choose the Add Property option from the Search Property drop-down menu.

Enter your website’s URL and click continue.

http:// and https:// URLs are treated differently by Google, as are http://www and http:// (without www). Google considers these to be four separate websites. 

For now, just enter one of the variations and once verified you can repeat this process to add all four variations of your website.

Step 3: Verify that you own the domain

Verifying ownership of the website is the next step. This can be done in few different ways:

HTML File verification

To use this method, you must download and upload the given HTML file to your website’s ROOT folder. The public_html folder is usually the location for this file.

Once the file has been uploaded, you can click the VERIFY button and move on to the next step.

Make sure to keep the file always in the root folder of your website. Remove it and website ownership will also be removed.

HTML Tag

The meta tag provided by Google must be copied and added to the *head> section of your website in order to use this verification method.

You can do this in the Headers and Footers plugin, as we did above for Google Analytics.

Step 4: Repeat the process for ALL website variations

When one of your website’s addresses has been added and verified, you must repeat this process until all your website’s addresses have been added.

You need to add and verify all four instances of https on your website if it is installed:

  1. http://www.example.com
  2. http://example.com
  3. https://www.example.com
  4. https://example.com

Google Search Console Settings

You can access SETTINGS in order to view ownership status, add/remove users, and change their permissions.

The Google search console now provides you with tools and reports to measure and improve your site’s performance in Google.