How to Install Google Analytics in WordPress
Good news: this is a super quick and fairly simple task. For the quick and dirty step-by-step jump ahead, or for some background info read on…
First, a quick overview to remind you what Google Analytics is and why you need it. Google Analytics is a free tool made by Google that will analyze your personal website traffic. Choose a time frame and quickly see at-a-glance how much and what type of audience traffic is visiting your site. Google Analytics arms you with data to help inform better decision-making for your sales and marketing strategies. At the most basic level, Google Analytics provides…
- Visitor demographics,
- Bounce rates,
- New vs. returning visitors,
- Real-time site data,
- Visitor device type,
- Pages visited and time spent on site
Source: Google Analytics
As you grow more familiar with the platform, use Google Analytics to set up and track digital advertising campaigns, view social media and content analytics, and even create unique marketing goals.
Got it? Now, here’s a step-by-step guide on how to install Google Analytics into your WordPress site.
Get Your Unique Google Analytics Tracking Code
Google Analytics provides its users with a code to be copy and pasted into your WordPress site. We’ll walk you through how to get the code, what to do with it, and why.
Step 1: Remember that Google Analytics is free. The only “price” of admission is to have a Gmail account (also free), so make sure you have one of those. Need one? Visit here.
Step 2: Visit analytics.google.com and log in with your Gmail account name and password.
Step 3: You’ll need to make your WordPress URL play nice with Google Analytics. Google calls your site URL a “property.” Setting up a property is a painless process with an easy walk-through, but navigation support is available.
Step 4: Go to the Admin section > choose your Account and Property from the dropdowns > Tracking Info > Tracking Code
You’ll see your unique Tracking ID and this message followed by your personalized Google Analytics Tracking Code
Source: Google Analytics
Step 5: Copy the code! (CTRL + C)
Step 6: Login to your WordPress account and click on Appearance > Editor > Header
Step 7: When the header code pops up, search for <head> and then </head>. Just before </head> paste your Google Analytics code (CTRL + V). Be careful not to disturb any of the other header code that’s part of your theme. Update file and voila!
Another (way easier) option?
Save time and instantly install Google Analytics with this plugin from MOJO Marketplace. You’ll need your Tracking ID, but otherwise, you’re all set! Bonus: this ensures that Google Analytics will automatically populate on every new web page you create for your WordPress site, this is essential when tracking your site visitor’s journey.