How to add google analytics on a blog

This guide will show you how to add google analytics on a blog.

This is a much requested feature and the forums are filled with requests for adding google analytics to their blogs as they’re not enough for those content hungry audience.

But, I have found out a simple workaround that will let you add google analytics to your own very WORDPRESS.COM blog. And, yes, I’m not kidding anyone. (You can see the screenshots below).

THE PROBLEM the amazing blog service that runs on the much famous CMS(Content-management system) WordPress, but is all hosted and secured by it’s parent company – Automattic, has amazing features built right in.

But, as they say, there are no free lunches, unless you can keep up with the endless amount of restrictions they pose on you, you will end up paying some amount for their paid upgrades.

Now, let’s get to the point. forums are filled with complaints, griefs, and disappointments. And, there is a whole tag you can search for those kind of posts.

It looks simply that the people are not satisfied enough with the built in stats feature that offers.

default stats feature_with_shadow | How to add google analytics to a blog
The default stats feature. Not nifty enough

Well, to be honest, although the stats features get upgraded over time, they still lack professional and vital information that simply Google Analytics offers, and for free.

google analytics | How to add google analytics to a blog
Aah! The awesome google analytics dashboard

But it looks like that Automattic is just simply ignoring such a request.

But, don’t worry, you will get the solution on how you can add Google Analytics to your blog.


Well, the solution is simple and easy to get working.

The basic idea around this is that you use cloudflare to connect your blog and from there, you use their apps feature to connect google analytics with their tracking code and inject it right into the code of your site !


To get google analytics on your blog, there are some prerequisites:-

  • A blog WITH A CUSTOM DOMAIN. Remember, this guide won’t work until you have a custom domain. This is a requirement because the DNS settings are what are going to be pointed to cloudflare so it can inject some code into your site.
  • A cloudlflare account. You can get it over at cloudflare.
  • A google analytics account. if you don’t have one, just get one over at Google Analytics.



So, here is the main meat you wanted since the beginning. Let’s go:-

1) Go to the settings of the domain in your account. I bought mine from itself, so don’t worry, your setting might be different. Or, you can just login to your domain name provider. domain name | How to add google analytics to

2) From there, click on the edit domain name button (yours may change depending upon your provider).

Clicking on manage domain button | How to add google analytics to your blog

3) Let the screen remain open and login to your cloudflare account. Then, click on the add new website box and enter the URL of your website.

Cloudflare account | How to add google analytics to

4)Wait for it to do the scan. Then click “Continue setup”. You’ll sent to the following screen:

Cloudflare's screen for domain management | How to add Google Analytics to

Don’t worry about the huge number of settings. Just scroll down to the bottom and click “I’ve added all missing records, continue”.

5) Then, the following screen appears.

Cloudflare settings | How to add Google Analytics to

From there, you can customize your settings as per your requirement. And, then click continue.

6) On the next screen copy the nameserver URL they give you and add it to your domain name. You can see that I’ve already done that in my domain name settings on

nameservers | How to add Google analytics to

Domain settings on | How to add Google Analytics to

7) Then you’re all set. All you now have to do is wait for 24 hrs (unless you have a paid account on cloudflare) and then all you have to do is go to their “APPS” tab.

8) Scroll down and click on the OFF tab button and it will get ON.

Adding Google Analytics | How to add Google Analytics to

9) Just add the tracking code that Google analytics gives you and click submit. If you don’t know how to find that, it is under Admin, and under the centre column in property settings.

Then, add it to your cloudflare app and you’re done (except for the time it takes to activiate).

Finding google analytics ID


Though the solution is 100% working right now, might remove this feature, or can Cloudflare. So, as far as now, we’re in their hands.



Though the above screenshots are all taken by me from my own accounts, you can find some more proof screenshots that Google Analytics is running on WDARSENAL.COM (A blog).

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5


So, you can see that solution works 100% and you can even apply it to your won blog with the steps given above.

If you liked this post, I would appreciate if you got on the insider list (from below this post) and share it (via a social network – particularly Google+).

Enter your email address to follow this blog and receive notifications of new posts by email.

One thought on “How to add google analytics on a blog

Add your Awesome voice. Let's have a meaningful conversation. And remember, don't be a spammer (We hate 'em).

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s