Tracking and monitoring your website traffic play a vital role in your website success.

How is your website or blog doing? Is your traffic growing according to your goals?

While growing your traffic is another topic altogether, monitoring your website traffic will give you a big picture of how well or bad your website is performing.

With the data you captured, it is easy to measure what online strategies are working and what needs to be fixed. It’s never too early to track and monitor your site traffic.

I highly recommend anyone to start monitoring their website right from day one. In this post, you will learn how you can add Google Analytics to WordPress without installing a plugin.

Adding Google Analytics to WordPress site without a plugin

Why do you need to set up Google Analytics?

Most you of are probably familiar with Google Analytics. Google Analytics is a freemium web analytics service offered by Google that tracks and reports website traffic. It is the most widely used web analytics service on the internet.

With Google Analytics, you could track these key metrics on your site:

  • Sessions
  • Page Views
  • Traffic Sources
  • Bounce Rate
  • Conversion Rate
  • Devices type

These key metrics will provide you answers to following basic questions:

  • How many visitors visit your website on daily, weekly or monthly basis? You could track based on certain date range.
  • What’s the average number of page views per visitor?
  • How many visitors are exiting your website without any clicks? What’s the average time a visitor spends on your website?
  • What are the most popular landing pages on your website?
  • How do your visitors find your website?
  • Where is your audience from?
  • On what devices are your visitors visiting your website?

Once you are able to answer these questions, you can formulate better online strategies for your website and fixes any issues. For example, if the majority of your traffic is visiting your website on a mobile device, you can make sure that your website is mobile friendly.

How to add Google Analytics to WordPress without a plugin?Click To Tweet

How to add Google Analytics to WordPress without a plugin?

If you’re on WordPress, you might find out there are so many plugins that let you set up Google Analytics easily but that’s the goal of this post.

In this post, I am going to teach you how you can add Google Analytics in WordPress without a plugin. If you prefer to install a plugin, you can find out more here.

It might sound difficult at first especially if you don’t have much knowledge programming knowledge, but it’s not. Let me show you just how easy it is.

Step 1: Set up your Google Analytics account

If you already set up your Google Analytics account, you could jump to step 2.

Head over to Google Analytics, and sign up for a new account. Enter your website details and add it to your account.

Google Analytics add new account

Step 2: Get your Google Analytics tracking code

Log into your Google Analytics account and click on Admin on the sidebar.

Google Analytics dashboard

Select the website that you want to get the tracking code for by selecting the right Account and Property from the drop-down.

In the Property column, click Tracking Info followed by Tracking Code.

Google Analytics select properties

On the next screen, you should be able to see the script that you need to add to your WordPress site. Simply click on it to select the script and copy it.

Google Analytics tracking code

Step 3: Add Google Analytics tracking code to header.php file

Log into your WordPress Admin dashboard and go to Appearance > Editor. Click on header.php file on the right sidebar.

WordPress edit theme header

Paste the code that you copied right before the </head> tag.

WordPress edit theme header

Click Update and you’ done!

Final Thoughts

That’s it, you’ve added Google Analytics in WordPress without a plugin. Reducing the number of plugins installed on your WordPress site can greatly improve your site performance.

Now that you have Google Analytics all setup, you can start monitoring your website traffic. As you analyze the website traffic data, you will be able to identify what type of content, campaign or strategy that works for your website and audience.