Installing Google Analytics (Universal Analytics)

⚠ Note: “Google Analytics 4 is our next-generation measurement solution, and it’s replacing Universal Analytics. On July 1, 2023, standard Universal Analytics properties will stop processing data. We strongly encourage you to make the switch to Google Analytics 4 as soon as possible.”
Google

I recommend reading our guides on installing GA4 for the first time and migration from UA to GA4.

Video Walkthrough

Install the “Head, Footer and Post Injections” plugin

In WordPress click on “Plugins”, then “Add New”, then search for “Head, Footer and Post Injections”. Click “Install Now”, the “Activate”.

header-footer-plugin

To access the plugin, click on “Settings”, then “Header and Footer”

header-and-footer-settings

Log into https://analytics.google.com/

Get Google Analytics Tracking Code

If the client does not have Google Analytics set up at all for them yet, click on the gear icon at the bottom, then “Create Account”

create-google-analytics-account

After you fill in all the fields, click “Get Tracking ID”

You will need to copy the Google Analytics tracking code. We are going to paste it into the WordPress plugin.

get-google-analytics-tracking-id

After you have copied the Google Analytics tracking code, go back into WordPress and click on “Settings”, then “Header and Footer”

worpress-settings

Paste the Google Analytics tracking code into the box that says “HEAD PAGE SECTION, INJECTION ON EVERY PAGE.”

insert-google-analytics-tracking-code

DON’T FORGET TO SCROLL DOWN AND CLICK SAVE

save-changes

Test The Google Analytics Tracking Code

Now go back into Google Analytics and click on “Real-Time”. This shows if any users are currently on the site. Visit a specific page and remember the URL. You can click on the “Content” tab under “Real-Time” to see if it’s tracking you properly. If it is, then you are all done!

test-google-analytics