How To Paste Tracking Code For Google Analytics into your WP site – 3 Easy Methods

Wondering how to paste tracking code for Google Analytics into your WordPress site?

In this article I’m going to show you three methods for installing Google Analytics in your WordPress site.

But first, what is Google Analytics?

In a nutshell, GA is the most advanced website analytics platform there is. It allows you to track:

  • who visits your website
  • how they find your website
  • what they do once they’re on your website

And the best part? It’s 100% free.

Here are three easy ways of installing Google Analytics in your WordPress website.

In the first two methods, you need your Google Analytics Tracking Code, so let’s take care of that first.

How To Get Your Google Analytics Tracking Code

Log in to your Google Analytics account and scroll down to the bottom of the left-side panel, and click on ‘Admin’:

how to paste tracking code for google analytics

On the next screen, go to the centre column titled ‘Property’ and click on the tab that says ‘Tracking Info’:

how to paste tracking code for google analytics

Under ‘Tracking Info’, click on ‘Tracking Code’:

how to paste tracking code for google analytics

You’ll now see your Google Analytics Tracking Code (aka ‘Global Site Tag for Google Analytics’):

how to paste tracking code for google analytics

Select and copy the code in the box and paste it into a text file such as Simple Note or Google Keep.

Method #1 – Install Google Analytics Tracking Code Without a Plugin

In your WordPress dashboard, go to ‘Appearance’ > ‘Editor’ and then ‘Theme Header’.

Then just drop the code in to the box provided.

I use a WordPress on the Genesis Framework, so I can’t show you screenshots for the above procedure.

This is how to do it in Genesis:

First, click on Genesis and then Theme Settings:

how to paste tracking code for google analytics

Then scroll down to the box titled ‘Header Scripts’ and drop your Google Analytics Tracking Code in the box:

how to paste tracking code for google analytics

And that’s it – your WordPress site is now connected to Google Analytics.

Method #2 - Install GA Tracking Code using ‘Headers and Footers’ plugin

First go to ‘Plugins’ > ‘Add New’ and search for ‘insert headers and footers’ and click ‘Install Now’:

how to paste tracking code for google analytics

Then click ‘Activate’:

how to paste tracking code for google analytics

Next, click on ‘Settings’ in the left-side panel, and then click on ‘Insert Headers and Footers’:

how to paste tracking code for google analytics

Now just drop your Google Analytics Tracking Code into the ‘Scripts in Header’ box and press ‘Save’:

how to paste tracking code for google analytics

Method #3 – Install Google Analytics using Monster Insights

Go to ‘Plugins’ > ‘Add New’ and search for ‘monster insights’:

how to paste tracking code for google analytics

Find the plugin titled ‘Google Analytics Dashboard Plugin for WordPress by MonsterInsights’ and click ‘Install Now’. Then click ‘Activate’.

Next, look for the ‘Insights’ tab in the left-side panel of your WordPress dashboard:

how to paste tracking code for google analytics

Click on ‘Settings’ and then click ‘Authenticate with your Google account’:

how to paste tracking code for google analytics

On the next screen click on your Google account that is linked to Google Analytics:

how to paste tracking code for google analytics

On the next screen click the ‘Allow’ button:

how to paste tracking code for google analytics

Then choose the Google Analytics profile that you want to connect with:

how to paste tracking code for google analytics

You should now see a message in the Monster Insights plugin saying that your Analytics profile is now active.

how to paste tracking code for google analytics

That’s it – you’re now set up to get Google Analytics metrics for your website.

This post was most recently updated on July 22nd, 2020

Rob Powell
Follow Me

4 thoughts on “How To Paste Tracking Code For Google Analytics into your WP site – 3 Easy Methods”

  1. Thank you for sharing this valuable content it really help me. With this article, anyone can use Google Analytics and also anyone can paste tracking code for Google Analytics.

  2. Hi Rob,
    Thanks for this article. I’m trying to do this from an iPad Pro, but there’s no “appearance” option in the settings. Can this be done from an iPad, or can it only be done from a PC? Thank you ??

  3. Hi Clive,

    Thanks for your question.

    I’m not sure that you can install GA tracking code on an iPad using the method I described in my article. I think you would have to install a Google Analytics App for iPad. The app will have a field or a box where you enter your Google Analytics API key etc.

    Here is an article that describes some Google Analytics Apps for iPad: Monitor Google Analytics From Your iPhone & iPad: 7 Top Apps

    Hope this helps 🙂
    Rob.

Comments are closed.

Share
Tweet
Pin