How to embed Google Analytics in WordPress



The reason you’re here is clear, you want to know what the Google Search Console colony can tell you about your boat.

You’ve happened at the right time. My course is heading in that direction and I can take you to the Google Analytics colony to find the code to control your ship on WordPress.

Get on board, let’s go on the Google Analytics assault!

Why connect Google Analytics to WordPress?

Captain do you leave skeptical? The data will make you think again!

Connecting your site to Google Analytics allows you to know in detail the behavior of users who come into contact with it.

If you’ve got a ship at sea, it’s only natural that you’d want to know if it’s holding its load, if it’s attracting attention, or if what’s inside it is of interest to anyone else. To find out you can always rely on the advice of my crew of digital sea veterans.

Contact the Qelie!

Like Google Search Console, this other Google tool also has a safe harbor of control for your ship. The two ports are in communication, but they return different results for the purposes of your goals; that’s why it’s important to have both.

In fact with Google Analytics you can know:

  • who’s visiting your website;
  • when they visit it the most;
  • what kind of device it uses and what resolution it has;
  • what language it speaks and where it is located;
  • keep track of what he’s doing on your website;
  • how long it stays there;
  • how many go away;
  • how they get to your site;
  • how they interact with the content on your site.

All this data is essential for monitoring your ship and correcting your course if it is the wrong one.

This means that if you have a lot of access from French users and a high bounce rate, the solution might be to translate your site into French and see if the bounce rate (the percentage of people who abandon) decreases. You might discover a new market you haven’t considered, understand?

How to sign up for Google Analytics in three steps

Starting this journey without even having a Google Analytics login is like burning a hole in the ground, let alone me giving you access to my account.

So it’s time to see how it’s done, let’s get into Google Analytics!

Click on Configure for free and start the registration process:

  • enter your business name and confirm for data sharing;
  • select what you want to monitor, in this case choose Web;
  • type in the property details, so business name, site address, category (the same as Google My Business) and finally the time zone of the state you are in.

That’s it, you’re finally signed up for Google Analytics. Now wind in your sails and sails out to sea, let’s head towards inserting the code in WordPress.

Integrating Google Analytics into WordPress

Since you’ve just signed up, the first page you see is just the page that allows you to monitor the site, which is the code you need to enter into the site.

Arrrh! When you created the account did you have an urgent assault to make? Log in to Google Analytics, find the code in the section of Administrator under the heading < > Monitoring information.

Captain, code integration starts here; there are two possible ways to get there. I’ll show you both, then you can decide which one is more comfortable for you.

Manual insertion

This mode is the most recommended, but the success may not be guaranteed due to the fact that you have to put hands on the site code and if you are unfamiliar you could create problems.

The first thing to do is to copy the code from the Analytics screen. I recommend that you carefully select all the text without forgetting a single parenthesis.

Once this is done open your WordPress management platform and from I’m waiting for ➡️ Theme Editor.

Here you are in front of the theme editing space. The most complex part is to select the part of the theme header where you will have to insert your code between <head> and </head>.

As WordPress also warned you, changing this text means changing the basic settings of the theme. That’s why it’s best to rely on a crew of experts in programming and configuring SEO tools. Captain this is your chance,

Hire us!

Insertion with plugin

The other alternative, perhaps simpler for the inexperienced, is to install plugins on WordPress to simplify the implementation of the code. I present two of them.

Google Analytics Dashboard

The first one is the Analytics plugin which is called Google Analytics Dashboard. Do the force search, it’s the top of the list!

This way the code is inserted automatically without having to edit the header file.

Once the plugin is installed do the authentication to give access to Analytics data to the plugin from the side menu Insights ➡️ Settings ➡️ Connect MonsterInsight.

Enter all your Google data and Analytics is ready to go at collecting data around your site.

Want an even faster method? I’ll show you the other plugin!

AddFunc Head & Footer Code

Using this plugin makes things a lot easier dear my Captain! That’s because with this plugin you’ll be able to manage not only Analytics code, but also Facebook pixel code and privacy codes from Iubenda or other services.

The advantage of using AddFunc in fact is to not weigh down WordPress by installing a plugin for each service your site needs.

Start by installing the plugin, it also shows up among the first results if you spell the name right.

Once installed just go to the plugin settings and enter the string of code from Analytics in the space dedicated to the Header. You can’t go wrong this time, the space dedicated to the header starts and ends inside this box, so paste the code without fear.

Simpler than I thought captain! The modalities are all correct, but monitoring doesn’t have to be all inside Analytics; just as the ship isn’t made to stay in port, the next step requires monitoring the data collected.

Our journey stops here, if you need any more information don’t hesitate to contact me. The Qelie ship is always looking for new adventures.

Next Post