Here’s how you set up Google Analytics on your wordpress* website.
First of all – do you have a Google account? You need one.
Have you created your Google Analytics account? pop over here and do that right now.
You’re going to need your tracking code, which you’ll find if you’re logged into your GA account: Click on Admin, in the middle ‘Property‘ column click on Tracking info, then Tracking code. Keep that page open, you’re going to need it.
All Googled up? Let’s rock and roll.
—————————-
To set up GA, you will need to add some script to your website. You will see this snippet in Account > Profile > Admin >Property > Tracking Info > Tracking Code. It looks like this:
Then log into your CMS and access your site’s HTML code. The script must be placed at the top of your website page, immediately before the tag that appears on each page you want to track, or place the javascript snippet before the </head> tag in your template. Here’s the basic instructions from Google themselves. Sounds tricky right? It’s not really, just read on to see how to install google analytics on your wordpress website:
How to install google analytics ON WordPress
You can install the GA code on WordPress in a few ways, and today I’m going to go over two of the easier methods.
USING A PLUGIN
You can use plugins specifically for the job, but some other plugins include the functionality, particularly the better SEO plugins. You want to have as few plugins as necessary really, so decide what’s important to you. My recommendation: If you’re already using All in One SEO Plugin or the YOAST/Monster Insights plugin for SEO, use them to install google analytics. You will only need your UA code (also called your tracking ID), it’s formatted like this: UA-000000-01 and you will find it on the same page as the script you see above.
Instructions for adding code in All in One SEO: https://semperplugins.com/documentation/setting-up-google-analytics/
Instructions for adding code in YOAST/Monster Insights: – https://www.monsterinsights.com/docs/connect-google-analytics/
ADDING CODE TO THE SITE HEADER
I know this sounds terrifying, but many premium themes give you easy access to this. Here’s how to add Google Analytics to Divi, as that’s the premium theme I usually work with.
How to add Google Analytics in Divi without a plugin
1. On the tracking code page you have open in google analytics, Copy the script.
2. Log in to your WordPress admin dashboard. Go to Divi > Theme Options > Integrations and add the code you copied to the box that says “Add code to the body (good for tracking codes such as google analytics)”. Click save.
AND THAT’S IT!
Now go dig for numbers!
*I’m afraid you can’t do this with the freebie version of WordPress.com 🙁 However if you’re paying for the wordpress.com business plan then GA is included with your site. here’s how to set it up – https://en.support.wordpress.com/google-analytics/.
Pin me and share the love…





0 Comments