How To Add Google Analytics In WordPress Site
Do you have a WordPress site??? Up and running??? Great!!
It is a high time to see how users interact with your website. Where do they land? Which page do they quit in a short span? Which page hold them for long? ,etc. This data insight is valuable to any webmaster. You have more scope for improving, thus, welcoming a swarming traffic to your website.
Google Analytics is a web tracking service offered by Google. It reports the number of active visitors, sessions on your website, user demographics, interest, source of origin etc.
You can either create a custom dashboard for your perusal or can export analytics reports in various formats.
Importance of Analytics
The webmasters need data insights to see how their website reach the audience. What is the traffic incurred by their website? How many internet users find it useful or entertaining? Every webmaster from any niche aims for higher traffic. To optimize the website with visitor’s perspective, the negative and positive areas should be looked upon. Analytics provide this information of visitor’s interaction with the website.
Analytics will help you to know who are visiting, from where they originate and what in your website they enjoy. You have no other way to measure traffic without insight information.
Why Google Analytics for WordPress Website
The best feature of Google Analytics is ‘IT IS FREE‘. I find it most reliable. It provides accurate data.
You may be thinking why Google Analytics for WordPress? Apart from offering great features and making it easy to incur insight reports, WordPress have wonderful, reliable and easy to implement plugins. You don’t need to be tech-savvy to learn and understand the user’s activity report.
How Google Analytics works for WordPress
This single snippet of strip functions for every page across the website in a similar manner.
Most Important data provided by Google Analytics that every webmaster craves for is:
- Pageviews– number of pages a visitor traverse
- Sessions– individual visitors on the website
- Source of origin– from where the visitor came
- Bounce rate– percentage of the users who left immediately
- Session time– how long they stay
- Page per session– how many pages they visit
- Conversion– The actionable they completed
How to Install Google Analytics on WordPress? (4 Ways)
There are few different ways you can install Google Analytics on WordPress. These are briefed further. But, before you do so, you are required to a have a Google account. If you have well and good, else you need to sign-up on google.com.
Once you have the Google account handy, visit https://analytics.google.com/. Login with your Google account credentials.
Set up your Google Analytics account by following prompts that comes by. Once you are done creating an account for your site. You need to find tracking code to paste in your website.
- Click on “Admin” tab
- Select an account from “Account” column.
- Click on “Tracking Info” under property column.
- Under Tracking Info select “Tracking Code“.
When you click on “Tracking code“. A new window will prompt on screen with a code snippet. Copy the highlighted code.
Analytics Code Installation Methods
There are many ways to install the code on your website.
Methode 1: Manually Adding Google Analytics code
If you can handle codes well, I would recommend Installing the code manually.
# Login to your WordPress website. Go to website dashboard. Open EDITOR under APPEARANCE menu.
# On the right side of the screen, find ‘header.php‘ file in the list of templates. You can also highlight the file name by pressing CTRL+F and search for the file.
# Paste the tracking code under <head> tag and before </head> tag.
# Click on ‘UPDATE’
# To confirm whether you were able to make it properly, Go back to Google Analytics account. Refresh the page to see the data recorded under REPORTING tab. It may take up to 48 hours for the data to show in the Analytics pane.
# If you don’t receive the data you can click ‘SEND TEST TRAFFIC‘. It will test by making a visit to your website.
Methode 2: Adding Through WordPress Plugins
This is the best method for a beginner who is not a code savvy. WordPress offers numerous WordPress plugins for google analytics. Say, Google Analytics by MonsterInsights, Yoast SEO, WP Statistics, WP Power Stats etc.
I use Google Analytics by MonsterInsights plugin and would recommend others to go for this.
#1. Download the desired plugin from WordPress plugins directory.
#2. Activate the plugin.
#3. In your WordPress Dashboard, Look for ‘Settings‘ beneath ‘Insights‘ tab. Click on ‘settings‘.
#4. Now you need to connect your Google Analytics account to the plugin. There are two ways of doing it.
Authenticate your Google Account:
# To Authenticate your Account, Go to General tab Under ‘general settings’
# Find a button stating “Authenticate your Google Account”.
# On clicking it, it will directly connect you to analytics once you allow.
Enter UA code manually:
# You can manually add UA code into the plugin. Simply check the box prompting to “Manually enter your UA code“.
# Now open your Google Analytics account.
# Look ‘Property’ tab under “Admin” tab. Tracking Info » Tracking Code. Copy the UA code from there and place on your website page where it prompted to paste UA code.
# Click ‘SAVE CHANGES’.
Methode 3: Adding Through Google Tag Manager (GTM)
This tag manager let you access all sites in one plane. You can add Google Analytics through GTM. See how:
# Login to Google Tag Manager. Under “Admin” tab in GMT, create a new account.
# Setup or add a “new container“. Select “web” and create.
# When you create. You will be shown a code for the container.
# Add this code in the <body> tag in the source code of every web page you want to track. Or WordPress users can simply install this plugin WP Google Tag Manager and put your GTM code which you can find in that code container window, highlighted in the image above.
# Now you need to select a tag type for your container. Under “WORKSPACE” tab, select “tags” from the left sidebar menu.
# Untitled Tags » Choose Tag Type » Universal Analytics.
# At last, configure your tag by adding your Google Analytics UA code.
Methode 4: Adding Through WordPress Theme
# Mostly, The WordPress themes allow you to add header and footer script.
# Add the code obtained from GTM to into your blog.
# Go to Appearance » Theme Options. Look for header and footer script. Paste the tracking code there.
# You are done doing it.
You are done with integrating Google Analytics into your WordPress website. Now You can start collecting insight data for your perusal. Navigate Overview and Audience section under-“Reporting” for tracking visitor’s behavior.
Google Analytics once implemented properly will help you measure your website performance and user engagement level.
There are few more methods other than above 4 mentioned. But adding more methods will make this post complicated. So I will explain other skipped methods to add Analytics code in my other articles. I would recommend you to add Google Analytics code using the manual method as I find it easy and can avoid adding one more plugin just to add analytics code.
Share your recommended methods to add Analytics code in the comment section. Also, do let me know which method you find easy to implement. If you find this tutorial helpful and easy to understand. All I can ask you to share it on your social networks.
Latest posts by Alok (see all)
- 9 Tips To Protect Your WordPress Blog Like The Great Wall of China - February 13, 2017
- 10 Practical Reasons Behind Blogging Failure You Need To Know - February 9, 2017
- 8 Tools To Lookup Perfect Domain Name Suggestion For Your New Domain - February 2, 2017