Google Analytics
Wordpress without Plugin

AutoHotkey, AHK editors - which one should i use?

If you have a webpage Google Analytics is a must-have tool in your arsenal. You can detect, analyze your visitors’ actions (visitor=customer). It’s free and powerful. You can never go wrong with GA. It’s time to implement the Google Analytics Tracking code if you don’t use or you use a 3rd party.  Time is key and unfortunately, we are not able to go back in time. This means if you add Google Analytics’s code 1 year later to your site you will lose 1-year invaluable statistics about your visitors, customers and overall about how does your site perform. Only basic human interactions are required don’t worry about hurting your site.

RPAWR-cosmetic-divider

What is Google Analytics, GA?

Google analytics or GA is a web analytics tool by Google. It tracks website traffic and shows the most important KPIs. (Key Performance Indicator) It also has cool additional features like tracking your Adwords campaign.  Google Analytics lets you have a better understanding of your online activities and allows you to reinforce your marketing strategy.

Google-Analytics-RPAWR-WordPress-Powerful-Tool-Love-GA
divider bar

PROs gazillion+1 CONs disadvantages who don’t use it

divider bar

How to install Google Analytics to your WP site?

Forget Plugin - DIY

divider bar

I do love WordPress plugins, but unnecessary 3rd party tools are not welcomed when I can replace them sacrificing only 5 mins from my life. PageSpeed matters, do I really need that particular plugin? It’s not an easy question in general, but with GA as I mentioned before you can’t go wrong.

divider bar

Google Analytics is highly recommendeddivider bar

The official Google site provides you in-depth documentation about this awesome marketing tool. You can also use Google’s support site to get quick answers to your questions.

I’ve checked WordPress’ Plugin market, there are severe good programmers who made a tool to replace this 5 minutes task.

You can find it on your WordPress’ Admin sidebar – under Plugins – Add new.
https://yoursite/wp-admin/plugin-install.php?s=Google+Analytics&tab=search&type=term

Get Started with Google Analytics

  • In order to use GA, you need an Analytics account.
  • Visit the following link: http://www.google.com/analytics/
  • If you don’t have an account you can create one for free
  • Or sign in to your accountdivider bar

Google-Analytics-RPAWR-WordPress-Analytics-Sign-Up

Or just sign in..

Google-Analytics-RPAWR-WordPress-Analytics-Sign-In

Input fields all the time… zZz

divider bar

Google-Analytics-RPAWR-WordPress-Analytics-Login-Password-Advices

divider bar

  • Take care of your digital footprints!
  • Always use special characters AND numbers in your passwords
  • Never use the same password twice
  • Don’t use obvious patterns. Names, your dog’s birthday, etc…
  • Don’t share your passwords!
  • Use a password manager tool

Set up a property in your Google Analytics account

You can’t go wrong here. If you want to add another GA property to your account then find it in the admin panel. (left bottom icon)

divider bar

Google-Analytics-RPAWR-WordPress-Analytics-Set-Up-Account-Property

divider bar

  • The website name, use a name which will identify your site in the Google Analytics overview screen. This helps you to be organized.
  • Website URL, take care of the proper URL. You can’t create a property if it doesn’t exist or not formatted correctly.
  • Industry Category, different goal templates set in Google Analytics for different industries.
  • Reporting Time Zone, this format will be used in your reports, regardless of where the data comes from.

divider bar

Google-Analytics-RPAWR-WordPress-Analytics-Account-Property-DataSharing

Check the Data Sharing Settings, be responsible here.

Now you need to push the Get Tracking ID button.

divider bar

Google-Analytics-RPAWR-WordPress-Analytics-Account-Property-TrackingID-button

divider bar

The Google Analytics Tracking ID

Google-Analytics-WordPress-Tracking-ID

Path to Tracking ID, Code

Admin \ Property Settings \ Tracking Info \ Tracking Code

Under the Tracking Info menu, you can get your unique identifier generated by the system. It’s called Tracking ID. This ID identifies your property, page.

Just choose the Tracking code, where you get this ID. You will need this Tracking ID, so memorize it somehow.

After the Tracking ID, you need to check the Website Tracking. This is a javascript tracking code.

Just copy the code from the field.

divider bar

To make sure, copy the text into notepad and check your code.

Google-Analytics-RPAWR-WordPress-Tracking-Code-Check-Notepad

Now open your browser and navigate to your WP admin’s page. Find the Theme Editor under the Appearance menu.

Google-Analytics-RPAWR-WordPress-Tracking-Code-WP-Appearance-Theme-Editor

Select the Theme Editor  (WP Admin\Appearance\Theme Editor)

Now you need to look for a file called header.php. Right side, check the files and double click on header.php

Google-Analytics-RPAWR-WordPress-Tracking-Code-WP-Theme-Editor-Php-File

After you clicked on it, you will see a code, text editor in your WordPress screen.

You need to find the start of the head tag, see picture line 16.
Just paste the code you copied earlier from Google Analytics site.

Google-Analytics-RPAWR-WordPress-Global-Site-Tag-JS

Now you have the updated file, it’s time to check it. It should work by now.

Just visit your site, then open your new Google Analytics account.
On the main dashboard, you can immediately check the number of your active users.
Since you visited your site GA should measure your activity.
If you see a number greater than zero you then you have succeeded.

You shown as an acitve user in GA

RPAWR-cosmetic-divider

If you are interested in saving yourself a lot of time, check AHK.

Autohotkey is an automation tool, easy to learn, powerful!

You can check my favorite editors here.