How to Set Up Google Analytics Without a Plugin

Set Up Google Analytics in WordPress Without a Plugin in 7 Steps

Set Up Google Analytics in WordPress

Graphic by Rachel Ann Custodio

At this point, you’ve successfully got your website up and running. You may have even started implementing a few beginner SEO tips. Now, you want to know how your website and/or SEO performance is doing by installing Google Analytics.

Setting up Google Analytics in WordPress without a plugin is a simple process that requires mostly copying and pasting. Below is a 7-step guide on installing the Google Analytics tracking code to your website.

How to Set up Google Analytics in WordPress:

Step 1) Sign up for a Google Analytics account by visiting If you already have a Google account and you’re logged in, you’ll see this page.

Google Analytics Account Sign Up

The page where you sign up for a Google Analytics account.

If you don’t have a Google account, you’ll see this page where it prompts you to sign in.

Google Analytics Account Login

The Google account login page.

Click on “Create account” and you’ll be redirected to this page. Fill out the fields to create a Google account.

Google Account Sign Up

The sign-up page for a Google account.

Step 2) Once you click the blue “Next step” button, you’ll be redirected to this page. Fill out the fields for Account Name, Website Name, and Website URL. Choose your Industry Category and Reporting Time Zone. Click the blue “Get Tracking ID” button. A pop-up will show up with Google’s Terms of Service. Click “Agree.”

Sign Up Google Analytics Sign Up Google Analytics

The page to sign up for a Google Analytics account.

Step 3) On the next page, you’ll find your Google Analytics Tracking ID and tracking code. Locate your tracking code below the “Website tracking” section.

Google Analytics Interface

Google Analytics interface.

Step 4) Copy the code exactly the way it is, starting from .

GA Tracking Code

An example of a Google Analytics tracking code script.

Step 5) In WordPress, navigate toward the bottom of the left black panel. Go to Appearance > Editor. You’ll see your .php files on the right panel. Click on Header.php.

Step 6) Find the tag within the Header.php file. An easy way to do this is by pressing CTRL+F (on PC) or Command+F (on Mac). Paste your unique Google Analytics tracking code right above the tag. Click on the blue “Update File” button to save your changes.

Where to Put GA Tracking Code

An illustration of where to place the Google Analytics tracking code in the Header.php file.

Step 7) Finally, make sure your Google Analytics tracking code is working. Open two tabs: one for your website and one for Google Analytics.

Google Analytics Test Traffic

An image displaying where you can send test traffic in Google Analytics.

Back in the Google Analytics interface where you copied the tracking code, click the “Send test traffic” button next to your Tracking ID. You should see that at least one active user is on your website—that one being you!

Getting Started With Google Analytics

Install Sooner

The sooner you set up Google Analytics on your website, the more information about your website you’ll have. After adding the tracking code to your website, you’ll only see data in Google Analytics from that day forward. Unfortunately, there isn’t a way to see historical data. Also, keep in mind that it might take a couple of days for Google to show you any statistics.

Filter Out Internal Traffic

If you or your employees are on the website often, you may want to filter your IP address, so Google doesn’t record your sessions. People often get excited when they see a high number of sessions and low bounce rate when those are actually a result of their doing. Don’t skew the data. Filter out your internal traffic, so the data you’re seeing is actually from your visitors.

Create a Goal

Almost all websites have a goal whether the website owner knows it or not. A goal in Google Analytics is an action you want your users to take.

Examples of goals include:

  • Filling out a contact form

  • Signing up for a newsletter

  • Scheduling an appointment

  • Making an online purchase

  • Downloading an e-book

Other goals can be a user spending more than 2 minutes on a page, playing a YouTube video, or visiting more than 1 page.

Setting up a goal is important because you can track conversions from your different digital marketing campaigns. It can reveal whether organic search brings in the most contact form fills or if social media is responsible for the most video plays. The sooner you set up goals, the more data you’ll have. And who wouldn’t want all of that data? 😉

Google Analytics is one of the best web analytics services in the industry. It also helps that it’s a free tool. Hope you found this step-by-step guide on installing Google Analytics in WordPress without a plugin helpful!

If you have any questions, please leave them below!