Well, this is an easy one, if you know how to do it, otherwise it can give you a terrible headache! Although there are plenty of tutorials on the web, we still receive a lot of requests regarding this specific question, so today I’ll take you through 3 different methods. Don’t worry. This is not that hard and you can easily do it by yourself. You really don’t need your geek friend for this 🙂

1. The most common way: use a plugin

Adding a GA tracking code through a plugin is the most common and simplest way, but it isn’t necessarily the best option. Remember what we wrote about plugins? They are awesome, but often you don’t really need them. Besides, if you choose a poorly written plugin, it can slow your website down and then you’ll have more trouble than benefits.

Anyway, the bright side of this method is that you can easily exclude yourself (as an admin) from tracking. What’s the point of tracking your own visits? You will only get a distorted analytic picture. As you will see later in this post, you can easily exclude yourself directly in the code.

There is nothing wrong with this method; it’s just that there are better options 🙂

2. The more or less OK way: add a GA tracking code directly to your theme

You can copy and paste a GA tracking code directly into your theme’s header.php, right after the tag. Easy, right?

BUT when you update your theme, this part will be overwritten, so you have to copy and paste the code again. Personally, I always use this method and I keep this in my mind when I do an update. Or you can create a WordPress child theme, copy header.php from the parent theme to the child theme and then you don’t need to worry when you update the parent theme.

3. The easiest way: find a GA field in your theme’s options

Go to Theme Options or live customizer and search for a Google Analytics tracking field, code or something similar. If you have one of our themes, copy and paste your code into the Custom Java Script field and … you’re almost done.

Different ways to exclude yourself from GA

Remember, you want to exclude yourself from your analytics reports (and the same goes for other admins). Again, there are different ways to do this, like Chrome extensions or applying different filters in the GA admin page. Again, there is no right or wrong way to do this, but in this post I will try to show you the easiest way.

If you have a static IP address, you can exclude yourself by creating a new filter in the GA admin page, or you can add this to your PHP code:

<?php if ( ! is_user_logged_in() ) { ?>
<!-- your Google Analytics code goes here -->
<?php } ?>

This excludes all logged-in users. 🙂

And now?

GA is a powerful tool. It will give you good and true insight information about your website and your audience. At first, you’ll probably find it a bit challenging, but take it step by step. You probably don’t need half of the tools there, anyway. Take a step back and breathe – it’s not that hard to understand.

If you are a bit lost, the official support provided by Google Analytics is a good way to start. It has loads of tutorials, videos and a very good support forum. Besides the official guide, you’ll find a lot of blogs and posts, dedicated to GA, no matter what your level of expertise is. Just remember to take it slowly, and soon you’ll learn the difference between sessions, visitors and page views and why a low bounce rate is actually a good thing.

Finally, don’t be worried about the quantity of traffic, but as always, focus on quality!

Happy tracking 🙂

Take a Look at Our WordPress Themes

Choose from a wide range of beautiful niche designs that you can try for free.

View All WordPress Themes
About the Author
After I graduated in Comparative Literature I decided it's time to go with more useful stuff. And what's better than WordPress? When I'm not on-line I'm probably sewing another pair of jeans, walking my dog or eating chocolate.