Website Analytics

How To Add Google Analytics Tracker In WordPress

Many of my friends asked me if I can provide a simple step by step guide to install Google Analytics in WordPress websites. I have tried myself searching over Google Search to find a simple blog with instructions but couldn’t find any. Most of the blogs were recommending to install 3rd party plugins which often doesn’t provide the full functionality of Google Analytics hence I have decided to write this post for my fellows.

In the coming days, I will be writing more blogs about how to implement & track user engagements on websites using Google Analytics / Google Tag Manager so stay in touch.

Please follow below the step by step guide to learn how to install the Google Analytics snippet in your WordPress website manually without using any 3rd party plug-in.

Step 1: Login to your Google Analytics Account

Step 2: After login, Click on Admin from the top menu and then click on Tracking Info & then Tracking Code from the Property column as shown below.

Step 3: From the Tracking Code page, copy the code as highlighted in the image below

Step 4: Login to your WordPress website’s Admin Panel:

Step 5: Mouse-Over on Appearance menu & Click on Editor from the Sub-Menu

Step 6: On the Editor screen, Select your active theme from the Top Right corner drop down.

Step 7: Now, Click on the Theme-Header file from the left Template file list menu

Step 8: Scroll down on the code until you will find the </head> tag

Step 9: Paste the code you have copied from the Google Analytics just before this </head> tag as shown in the picture below & Click on the Update File button.

Step 10: Browse your website and check the page source. Here you will find the Google Analytics code just before the </head> tag.

That’s it folks, implementation was done successfully.

Feel free to comment if you are facing any issue regarding Google Analytics implementations & I will do my best to get back to you with a solution.

Faisal Ahmed

Every brand has stories to tell - stories that will not only engage, inform, surprise, delight, and impact their audience, but that will also deliver on measurable business goals. My job is to turn these brand stories into profitability by measuring action insights & user behaviors.