How to Add Google Analytics to Your WordPress Website

  1. Non Plugin Route: Add snippet from Analytics to your header.php file or through theme header box 00:54
  2. Plugin Route: Monster Insights 02:54

Read the full episode transcript below:

00:28 David Blackmon: Hey everybody. Welcome to another episode of wp the podcast i’m David Blackmon

00:29 Tim Strifler: And I’m Tim Strifler.

00:30 David Blackmon: Today in episode 685 we’re going to talk about, how to add Google Analytics to your WordPress website. Yesterday we talked about submitting a sitemap to get Google to index your site. Once that site’s indexed and you start to get traffic coming to it you’re going to want to know hey where are they coming from, what are they interested in, which is going to allow you to build more content to cater towards your audience and stuff. Google Analytics is a an amazing tool, um that you can get. It is so much it’s so powerful and has so much information i do not know how to completely use it. I basically use it for what i think i want to use it, for and then i don’t even bite off all the other stuff that that there is to bite off in that that program but it’s insanely powerful for your website. So today we’re going to teach you how to get Google Analytics on your WordPress website, Tim?

01:38 Tim Strifler:  Yeah absolutely. So uh there’s essentially two routes that we’re gonna cover. One is using a plug-in and then one is not using a plug-in, and um there’s not necessarily a wrong answer and we’ll i’ll explain after we talk about them which version i use and in which scenarios, because i use both but for the non-plug-in route it’s super easy. Google Analytics is going to spit out a snippet it’s a javascript snippet that you add to the header of your site header.php file. And so if you are using kind of a uh a child theme and you have a header.php file you can drop it in there, or what’s even easier is most modern themes have a place for you to drop code in the header of your site. And so uh for example we use Divi we talk about Divi a lot Divi theme options and the integrations tab has a box for header and you can drop code snippets in there such as Google Analytics you can drop that in your header and then it automatically it adds it to the header of the the page so the code is run on every web web page of your site so super easy you don’t need to install any plugins you can just do that um and then dave’s gonna talk about the next option the plug-in route and then what we can discuss kind of when is a good time to use which option.

03:08 David Blackmon: Yeah, so one of the plugins that you can use uh is Monster Insights. And it is a very powerful tool as well, Tim do they have a free version i’m not sure if Monster Insights has a free version? They do,  yeah okay, And it’s a freemium model so they are an analytics. It’s an analytics plug-in for your website so let’s preface this by saying you do not need to have Monster Insights to get Google Analytics on your site. Google Analytics is insanely powerful and will give you all of the data that you can get in the Monster Insights. It’s Monster Insights just has a dashboard and some some custom ability inside the site that’s going to allow you to do that and you’re just simply going to install the site, install Monster Insights on your website and then um connect it to your Google Analytics, right?

04:00 Tim Strifler:  Exactly and so um i mentioned there’s like, there’s not necessarily a wrong answer, but in my opinion there’s times where going the plug-in route is better. I would say for most non-e-commerce websites don’t add a plug-in don’t add Monster Insights just add the snippet to your analytics. Now where i think it’s a good idea to use a plug-in such as Monster Insights is when you do have an e-commerce site because google analytics has the ability to measure uh all your e-commerce reporting aspects and so then you can you can basically see in Google Analytics. Well where are my most profitable countries if you have an international e-commerce site okay i can see that oh the United States i’m getting most of my my sales from and stuff like that. And so Monster Insights has integrations with both Woocommerce and easy digital downloads two of the most popular ecommerce platforms for WordPress, in order to automatically integrate your ecommerce data into Google Analytics, and so you can do it without using a plug-in. But it adds you have to customize you have to basically tell Google Analytics what data is what, and so it’s a lot easier to just use a plug-in such as Monster Insights, and so that’s what i recommend doing is if the site’s e-commerce use Monster Insights, or an equivalent plug-in. So you don’t have to customize the snippet code and do all this uh complicated stuff but if it’s not e-commerce just add a snippet to your header.php file or your theme header box and then just be done with it it’s super simple.

05:45 David Blackmon:  Awesome tomorrow we’ve got another great topic how to add facebook pixel to your WordPress website. If you’re wondering what the hell a Facebook pixel is come on over and listen to tomorrow and we’re going to let you know. Tim until tomorrow we’ll see you then.

05:56  Tim Strifler: Take care bye-bye

 

Did you Enjoy this Episode?

  • Will you consider sharing it online? Just click one of the share buttons below!
  • Will you leave us a review? 🙂
  • Have a question, or a topic request? Let us know in the comments below!

Want to Connect with David & Tim?

Submit a Comment

Your email address will not be published.

Where To Find Us

Listen to WP The Podcast on your favorite platform: