Disclaimer: This post contains affiliate links to some of the products I use and love. When you click these links and make a purchase, I may get a small commission. It won’t cost you anything, but it helps me to run this site. Find out the disclaimer here.
Wondering how to set up Google Analytics and Search Console for your new website?
Knowing how your audience interacts with your website is crucial for your success.
The best way to know your audience is through your traffic stats, and this is what Google Analytics provides for FREE.
One of the most important things when setting up your self-hosted WordPress site is to connect it to Google Analytics and Search Console.
But, if you don’t know how to do that, it can be confusing.
At first, I didn’t know how to set up Google Analytics and Search Console! I thought it can be scary!
Here it is! 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.
There is a lot to do when you first set up your WordPress site. You need to add plugins, get an attractive theme, protect your blog legally, and so much more. While all of those things are important, the one thing you must do in the very beginning is to connect your site to Google.
You may be wondering:
- What do Google Analytics and Search Console do for your blog, and why do you need them?
- Why is this so important?
- Can’t I just use plugins to set them up?
In fact, you need to connect your site to Google before publishing your content.
I know that some people, especially if you are new to running a site may feel very overwhelmed by doing this.
SO, here I am – always back in Monday for blogging tips and I’m going to explain the steps and walk you through how to add them to your site with a few simple clicks.
What is Google Analytics? Why do I need it?
Google Analytics is a free tool that allows you to collects the traffic to your website. You can use the data you collect to analyze it. Google gives for FREE to every website owner to use on their site at no charge.
And when you ask why is it so important? Well, you need to know and see how people find your site, isn’t it? Is it from Pinterest, Facebook, or organic search? You can also find out which posts or pages get the most traffic so you can optimize them to make more money.
How does Google Analytics work and what will it show me?
How can I connect my site to Google? You will need to set up your account. Then, Google will give a small piece of code that you can add to your site. After that, your site will connect to Google so they can track everything that happens to your site.
What will it show me? Everything about the traffic or the visitors to your site! You can find out:
- Audience interest: include the ages and genders of your audience. You can also find your most popular posts, posts that are not doing so well, and what kind of content your users are looking for.
- User Behavior: such as how long they stay on your site; if they enter and exit on the same page (bunce rate), how many pages they look at while they are there, and what content they click on. By using this information, you can decrease the bounce rate and increase your page views.
- How people find your site, whether that is through organic search, referrals, or social media.
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?
First of all, you do not want to use a plugin for this connection.
Why? Plugins can fail, and if it does, then you lose the connection. And, plugins can be hacked – that means you could be hacked. It is one of the risks of using any plugin.
Last month, I had an issue when publishing my post and after contacting my host, it turned out that there was a problem with one of my plugins and it should be deactivated. See? Not only the plugin could be hacked, but it can also bring harm to your site (ofc if there’s an error with the plugin).
When it comes to your analytics, you need to ensure that you do nothing to risk losing the connection with Google. One of the easy ways you can add the code given by Google is by using the Insert Headers & Footers plugin.
Didn’t I just say not to do this with a plugin?
Yes, I did. But this is not a plugin that opens a connection to Google. It merely adds the code you have in the header section. It is 100% safe and effective.
The plugin is a better option when you’re not tech-savvy. The Insert Headers & Footers plugin ensures you never lose the tracking you need.
Set up Google Analytics account
First, you need to set up your Google Analytics account (free). Follow all the steps and you will have your account set up in a few minutes.
Keep in your mind: you will want to use the same Gmail account you plan to use for all things associated with your site (both Google Analytics and Search Console) – makes it much easier to check analytics without logging in and out of your accounts.
Once you are logged into Analytics, it’s 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 the Property column, you will select +Create Property.
You will see questions about employees and type of industry. Answer them accordingly.
Next, choose your stream, which is Web. 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 the Property menu. Scroll down to Tracking Info > Tracking Code.
Copy the ENTIRE code you see on the Global Site Tag. This is what you are going to need to add to your site.
Add the code to Insert Headers & Footers
As mentioned above, you are going to use a plugin to add the tracking code to your site. The first thing to do is to add the plugin.
Log into your dashboard and go to Plugins > Add New > Search for Insert Headers & Footers.
Now, go into Settings > Insert Headers & Footers. Copy the code for the tag manager and paste the code in header section.
Congratulations! You just added the tracking code to your site!
What is Search Console? Why do I need it?
Google Search Console is a 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 it 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 so it can 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.
- 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.
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.
If you use Yoast, follow these steps how to add your Search Console to Yoast SEO.
Log in to Search Console and you should see a window show to prompt you to add a domain.
In the box, enter your URL — only the name of your site, do not include the https: or www – just abcsite.com.
Next, you will see a box that comes up with a bit of code you have to copy and paste. Do not close the 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.
To make it simpler, go to your provider, look for your advanced DNS record in the cPanel of your host (or get onto chat and ask them to help).
Under Create/Add New Record, select TXT and then leave the name blank, time at one hour (or second), 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.
Add your Sitemap to Google Search Console
And now, the final step is to add your sitemap to Search Console. The simplest way to do this is to set up the sitemap through Rank Math or Yost and then connect it to the Search console.
If you’re using Rank Math (like me) and already set up your account, you can follow these steps. And, you can follow this to add your sitemap to the Yoast SEO.
Finding and submitting the sitemap
Now, let’s find the Sitemap and submit it to search console!
Log into your dashboard and got to Rank Math > Sitemap setting.
Click on the hyperlink (see above). 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 sitemap that shows on the XML sitemap page. Make sure you copy the ENTIRE link.
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!
Log in to Search Console and look in the properties box. Make sure you select the one you are working on. Scroll down to Index > Sitemaps.
Go into the XML Sitemap you just validated, and copy the last portion of the file name (post-sitemap.xml) and paste that in the box and click submit.
That is all it takes! Your sitemap will now be validated by Google. You don’t have to do anything more with them.
FINALLY! YOU’RE DONE!
Yay! You did it! You just set up Google Analytics and Search Console! Now you can learn how to analyze what is happening on your site to make it better to increase your traffic and make money online.
YOU MIGHT LIKE
PIN FOR LATER