Google Analytic, WordPress SEO

How To Add Google Analytics To WordPress Without Using Plugin

Are you wondering about how to add Google Analytics to WordPress without using a plugin?

If you are not using Google Analytics for your website then you are missing a lot of valuable insight about your visitors.

Since Google Analytics tracks all the important data about the visitors, it will help you understand your visitors in a better way and create your user experience and marketing strategy accordingly.

With WordPress, it is very easy to set up Google Analytics by choosing one of the different plugins.

However, in some cases,

  • non-handy and badly coded plugins can slow down your website.
  • might sometime create a compatibility issue with the existing theme and plugins
  • may affect your site performance in the wrong way
  • may create security loopholes

 

In this situation, you might want to not use a plugin and rather set it up manually.

Here I will show how you can set up Google Analytics manually in a very easy way without using any plugins.

Just follow these steps:

 

  • Click on Create Account
  • Fill up your account name and click next
  • From the options select, what do you want to measure
  • Fill up the website name, website URL, category and time zone.

 

Entering website details on google analytics
  • Finally, click create button
  • You will be prompted a set of website tracking code something like this

 

Google analytic tracking  code

Now once you have generated the analytics tracking code, you need to add this code into your WordPress website. For this

  • login into WordPress admin and go to the dashboard.
  • navigate to appearance and then to editor.

 

Wordpress code for analytics

On the right side click on file header.php under the theme files.

Now paste your google analytics code before the closing </head> tag.

Tracking code for google analytics

NOw click the update file and That’s it!

This was all about adding Google Analytics code to WordPress without using WordPress plugins.

CHEERS!

You may also like : 

How to load your WordPress website faster by optimizing the images

 

Leave a Reply