
This post may contain affiliate links. That means if you click and buy, I may receive a small commission (at zero cost to you). Please see my full disclosure policy for details.
One of the first things you must do when setting up your self-hosted WordPress site is to connect it to Google Analytics and Search Console. But, if you have no idea how to do that, it can be a scary thought! After all — Google seems to run the world (at least online).
Believe it or not, this process is simpler than you may think. Just a few clicks, and you’ll have your site connected and tracking the stats you need to know.
When you first set up your WordPress site, there is a lot to do. You need to add plugins, get a theme, learn the terminology, and so much more. While all of those things are important, the one thing you must do is connect your site to Google. You may be wondering:
- What does Search Console do for my website, and why do I need it?
- Can’t I just use a plugin for this?
- Why is this so important?
- Is it possible to wait until I know what I am doing?
The truth is the first thing you must do after you set up your site is to connect it to Google. You need to do it before you do much at all — but especially before you start writing content.
You may feel very overwhelmed at the thought of doing this, especially if you are new to running a site. Don’t worry. I will explain it all and walk you through adding it to your site with a few simple clicks.

Struggling to know what to focus on with your blog?
What to focus on, and the mistakes to avoid making, to turn your blog from a hobby into a business.
Quick Navigation
What is Google Analytics, and why do I need it?
Google Analytics is a free tool that allows you to collect the traffic data to your website to analyze it. Yep! Google does not charge users for this feature – they give it to every website owner to use on their site.
Why is it so important? You need to see how users find your site. Is it Pinterest or organic search? You can also find out which pages get the most traffic, so you are sure to optimize them to make more money.
How does Google Analytics work?
You will set up your account. Then, Google will give you a small piece of code that you can add to your site. That connects your site to Google so they can track everything that happens.
What will Google Analytics show me?
Everything about the visitors to your site! You can find out:
- User Behavior such as how long they stay on your site if they enter and exit on the same page, how many pages they look at while they are there, and what content they click on.
- Audience interests include the ages and genders of your audience. You also find the type of content they are most interested in and will engage with the most.
- How people find your site, whether that is through organic search, referrals, or social media.
- Conversions for you to see how many people act on your site, such as signing up for your email or clicking on specific links.
Google shows you everything you need to know about the traffic and users on your site. That, in turn, allows you to analyze what works and does not so you can make improvements.
How do I add Google Analytics to WordPress?
You may be tempted to (or are already using) the Monster Insights plugin. You do not want to use a plugin for this connection.
Why?
First off, plugins can fail, and if it does, then you lose the connection. Besides, plugins can be hacked and open to vulnerabilities. That means you could be hacked. I am not saying this has happened, but it is one of the risks of using a plugin — any plugin.
When it comes to your analytics, you need to ensure that you do nothing to risk losing the connection with Google. There are two easy ways you can add this to your site: your headers file or a plugin.
“Wait? Did you not just say not to do this with a plugin??!!”
Yes. I did. But this is not a plugin that is open source code nor a connection to Google. It merely puts the code you add in the header section for you. It is 100% safe and effective.
The plugin, in this case, is a better option as if you update the header file in your theme, you need to add it again if you make any theme changes in the future. Using the Insert Headers & Footers plugin ensures you never lose the tracking you need.
Set up your Google Analytics account
The first step is to set up your Google Analytics account, which you can do for free. Follow the prompts, answer the questions, and you will have your account set up in a few minutes. Note that you will want to use the same Gmail account you plan to use for all things associated with your site. Doing so makes it much easier to check analytics without logging in and out of your accounts.
Once you are logged into Analytics, it is time to add your property. From the side menu, select Admin.

You should see your account listed in the first column. If not, click +Add Property and follow the steps to add yours. Make sure the account you are working on is selected. In this example, you can see that I am working on Penny Pinchin Mom.

In the Property column, you will select +Create Property.

You will see questions about employees and the type of industry. Answer them accordingly.
On the next screen, choose your stream, which is Web. Your site will show on mobile, but you are not setting up an app, so you will not track that way. The stats for your website will be monitored for both desktop and mobile users.

Enter the data for your site on the next screen. Enter the website and stream names. The URL should be your domain name. The Stream Name is a name for you to recognize the site from your home page. Once that is filled out, select create Stream.

Next, you need to find your tracking code. You will see Web Stream Details (if you do not see it, select Data Streams from the menu you see). Scroll down to Tagging Instructions. Expand the first window called the Global Tag site. Copy the ENTIRE code you see here by clicking the icon in the corner. This is what you are going to need to add to your site. Toggle to your dashboard for the next steps.

Add the code to Insert Headers & Footers
As mentioned above, you will use a light plugin to add the tracking code to your site. The first thing to do is to add the plugin.
Log into your dashboard and navigate to plugins.

Select Add New and Search for Insert Headers & Footers.

When you find it in the list select, Install Now.

Then, select Activate.

Now you are ready to add the tracking code to your site! If you did not already do so above, go back to Google and copy the tag manager’s code. Then, navigate to your site and from the dashboard and go into Settings > Insert Headers & Footers.

Paste the code in the Scripts in the Header box and hit save!

Congratulations!! You just added the tracking code to your site!!
What is Search Console, and why do I need it?
Google Search Console is a free tool that allows you to maintain, monitor, and troubleshoot your site through Google search results. While it is not ‘necessary,’ it is beneficial and recommended for all website administrators. In short, it allows you to understand better how Google sees your site and keywords to show it in search.
What will Search Console show me?
Search console offers several features that allow you to learn much more about your site and how Google views it. You can find things such as:
- Submit your sitemap so that Google better understands your site structure to find your content.
- Confirm Google can crawl your site and content to be added to the index and ranked for search.
- Get alerts from Google when there are indexing manual actions or other issues on your site.
- See Google search data for your site, including search terms, click-throughs, impressions, and more.
- Find the sites which link to your website so you can ensure they are from the places you want.
- Troubleshoot issues, such as mobile usability and search features.
Search console lets you see what Google sees so you know what works and does not so you can make necessary improvements.
How do I set up Google Search Console?
It takes a bit more work to connect your site to Google Search Console properly, but that does not mean it is difficult to do. If you follow these steps, you will be able to do easily do this.
Once you have YOAST set up, you then need to connect it to Search Console. Follow these steps to do that.
Log in to Search Console, and you should see a window show to prompt you to add a domain.

Note: if you do not see the window show, you can select the hamburger menu at the top of the screen and select + Add Property
In the box, enter your URL — only the name of your site. Do not include the HTTPS: or www – -just abcsite.com (for example)
Next, you will see a box that comes up with a bit of code you have to copy and paste.
****DO NOT CLOSE THIS WINDOW BEFORE YOU GO TO THE NEXT STEP!
You will need to log into your provider’s account to add the record. Google has this handy resource guide you can use to find who has your domain name (where you will add the verification – not your host), so you can easily walk through the process.
If you use Siteground, you can follow these steps. If not, look for your advanced DNS record in the cPanel of your host (or get onto chat and ask them to help).
Log into Siteground and go to your Accounts > Websites.

Find your domain and select Manage.

Then, select Site Tools.

From the side menu, select Domain and DNS Zone Editor.

Under Create New Record, select TXT and then leave the name blank, time at one hour and PASTE the code you found from Google Seach Console.

Go back to Search Console and press the Verify button. That should connect it. If not, wait for a few minutes and try again.
You are DONE! Your site is now connected to search console.
Add your Sitemap to Google Search Console
The final step is to add your sitemap to Search Console. The simplest way to do this is to set up the sitemap through Yoast and then connect it to Search console.
Setting up the Yoast Plugin
If you already have the Yoast plugin, you can jump ahead and start by opening Yoast to find your sitemap. If not, log into your site, and from the dashboard, scroll down to Plugins > Add New.
Type YOAST in the search box and hit enter.
You want to install the first YOAST Plugin you see (do not install the others). Click the INSTALL button.
Once installed, you will see that it says to Activate the plugin. Click that button.
Now you’ve got YOAST on your site! But you aren’t done yet. You need to set it up. Do not just try to do this on your own. Use the configuration wizard as it will walk you through the essential things you need to add to the plugin.
Go into SEO on your dashboard, and from there, you will see a box, and in that box, it says First-Time SEO Configuration. Click that link.
Just follow the steps, and you’ll have your plugin set up. The first box asks you if your site is live or not—select option A.
Next, your site is a blog, so check the top item.
You will next be asked if you are a company or a person. You are a person, so check the button and fill in your name in the box.
You will then be asked if you want to index pages and posts. You want both to be indexed on Google. Make sure the radial button says yes for each of these.
Now, you need to let YOAST know if there are multiple authors on your site. If you are the only person who creates content, say NO (even if you accept guest posts, mark this no).
You then need to indicate your default title settings. You can leave what you see here and always edit later.
The final steps are to sign up for emails or training (decide what you want to do), and then you are done. Yoast is added to your site, but we still need to create the sitemap.
Finding and submitting the sitemap
Now, let’s find the Sitemap and submit it to search console! Log into your dashboard and Navigate to SEO > General.
Then, click on features from the top bar.
Scroll down to XML Sitemaps. Make sure the box is toggled to ON. If not, toggle, scroll to the bottom and hit save. If it is already ON, go to the next step.
Next, click on the ? next to XML sitemaps. It will expand and show this text:
Click on the “See the XML Sitemap” link. A new page will open, and you will see something like this:
This is your sitemap! Now, you just need to verify that it is appropriately configured. To check this, copy the first (possibly only) sitemap that shows on the XML sitemap page. Make sure you copy the ENTIRE link.
In this example, I would copy https://bloggereducationnetwork.com/post-sitemap.xml. Go to the online XML Site Validator. Paste the URL into the box and hit the blue validate button.
You SHOULD see a green banner at the top of the next page that says your site is validated! If not, then there are errors you need to fix, and you will see them. Correct anything that comes up and later try again.
Log in to Search Console and look in the properties box. Make sure you select the one you are working on.
Next, scroll down to Index > Sitemaps.
You will be asked to add a new sitemap. Go into the XML Sitemap you just validated, and copy the LAST portion of the file name. Example: https://www.bloggereducationnetwork.com/post-sitemap.xml. I would copy post-sitemap.xml and paste that in the box and hit submit.
That is all it takes! Your sitemap will now be reviewed and validated by Google. You don’t have to do anything more with them.

Struggling to know what to focus on with your blog?
What to focus on, and the mistakes to avoid making, to turn your blog from a hobby into a business.
WHEW!!
You did it!! You just set up both your Google Analytics and Google Search Console! Now you can learn how to analyze what is happening on your site to make it better to increase your traffic and income.

This tutorial was so clear ad easy to follow. I did what I thought was impossible….Tracie is te best.
You are most welcome – and so very kind!!!
I did it! Whew is right lol! Thanks Tracie!!!!!!
YEAH!!!! It is scary if you don’t know what to do so I am glad this was helpful!
Thanks so much for this! FYI, the Siteground fields for DNS Zone Editor have changed significantly (for example, selecting “1 hour” instead of 3600) and I believe Google Search Console now requires pasting the *whole* Sitemap file name (unless I did it wrong – ha!)…but I figured it out. I am a newbie and your instructions were so helpful! Thank you again!
Yeah – they changed the dashboard and I am waiting to see that on my end so that I can update the instructions. (And, I am not so patiently waiting).
Oh my gosh, finally an easy to follow guide. Wish I’d found your blog 3 months ago. Thank you so much.
I am so happy it was helpful!!!!
This was a great walkthrough to confirm that I had, in fact, set up Search Console correctly a few months ago. Do you have any resources on how to navigate the data SC provides? Specifically, I’m curious about Coverage. I don’t have any data there. Thanks!
You will want to check out my Blog Analytics course and see if that is what you are looking to learn.
https://learngrowearncourse.com/p/blog-analytics
Hi Tracie, I have copied and pasted the code into my Scripts in Header box and it shows the code on my site. I’m not sure how to make it hide or why it is showing in the first place. Anyone else have trouble with this?
Make sure you put it in the righ place and did not forget any line of the code. Even a missing “<" can make it not work properly.
Once again very clear and easy to follow Thank you so much Tracie!
You are very welcome! I am glad I was able to make it easy for you to follow and implement.
Thank you so much! This was very helpful and easy to follow.
You are most welcome! I am glad that I was able to help you.
Thanks Tracie! This was very thorough and helpful!
Oh goodness. I’m so glad I got rid of Jetpack and followed your directions. I’ve been trying to figure out why my site was so slow for a week now. You are a goddess!
Hi Tracie, Very nice and detailed guide. I have installed Insert Headers and Footers plugin. However, its last update was more than 2 months ago and it shows “untested with your version of WordPress.” I’m running the latest (5.4) WP version. Should I use this plugin or revert to Monster Insights? Monster Insights shows compatible with this version of WP.
It should be OK as it is not anything but a placer. It puts the content where it needs to go on your site.
Thanks, this puts me at ease to use it.
This is a super clear and easy to follow. Thank you for sharing 🙂
You are very welcome – I am glad I can help!
Tracie, this was such a wonderful guide! Very thorough, detailed and easy to follow. I cannot thank you enough for making such a wonderful resource available!
You are most welcome! I am glad that it was easy for you to follow.
Thank you for making this SO EASY!!! This was an extremely helpful post that I will be sure to share if anyone asks me!
Hi Tracie, I have to admit I have NO IDEA what I’m doing, so I just blindly followed your steps as I read that it’s important (I’m a new blogger). Thank you for this article!
Welcome to the world of blogging!! Reach out if you need anything!
Thanks so much Tracie!!! There’s so much that goes into blogging but I am enjoying every step!
You are welcome!! And yes – it takes a lot to learn how to do all the things with blogging. But, the good news is that once you connect your site to Google Analytics and Search console, that piece is done.
Thank you for the tutorial! I was hesitant to even try but the instructions were easy to understand 🙂
Tracie, this tutorial was incredibly helpful, thank you so much for your clear and easy to follow instructions! I am a complete newbie and truly have no idea what I am doing, but was able to set up Google Analytics and Search Console by following the steps in this post, and am shocked it all worked. Again, thank you!!
This makes me so happy to hear! These blogging things can be really confusing so if I can help cut through that, it is worth it to me!