softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

3 Ways Of Adding Google Analytics To Your WordPress Website

Home3 Ways Of Adding Google Analytics To Your WordPress Website

Offer Expire Soon..


Only New User..


Google analytics is a great website analysis platform that monitors the performance of all types of websites and enables the website owners to take better and timely decisions for their websites. Google Analytics analyzes various aspects of a website like page views, bounce rate, website traffic, user behavior, referral sources, website conversions etc. This information is extremely crucial for the growth and improvement of a website.

Google analytics is the most commonly used analytics tool that is available for free. Having Google analytics connected to your website provides you a better insight on the performance of your website.

There are 3 ways through which you can connect Google analytics to your website, they are mentioned below:

Table of Contents

Toggle
  • Option 1 : Directly Add Google Analytics To Your WordPress Theme
  • Option 2 : Add Google Analytics To Your Website Through The ‘Insert Headers And Footers’ Plugin
  • Option 3 : Connect WordPress And Google Analytics Through MonsterInsights

Option 1 : Directly Add Google Analytics To Your WordPress Theme

Google Analytics can be easily incorporated in your WordPress website without the use of a plugin. This can be done through the header.php file or through the theme functions file. However, before you do this, it is recommended to take a complete website backup before you start editing the theme files.

For adding Google Analytics to your website through the header.php file, refer to the steps mentioned below:

  • Login to Google Analytics account.
  • Copy the tracking code of the website. You can get the tracking code of your website in Admin >> Tracking info >> Tracking Code.
  • Go to the header.php file of your WordPress website and paste the tracking code after the <body> tag.
  • Click on update.

In order to add Google Analytics to your website through the function file, add the code mentioned below to the functions.php file of your WordPress theme: 

<?php

add_action(‘wp_head’, ‘wpb_add_googleanalytics’);

function wpb_add_googleanalytics() { ?>

// Paste your Google Analytics tracking code here

<?php } ?>

Option 2 : Add Google Analytics To Your Website Through The ‘Insert Headers And Footers’ Plugin

If you don’t wish to edit any theme files, then you can add Google Analytics to your website easily through a plugin. You can use the plugin – ‘Insert Headers And Footers’ for this. This is an easy-to-use plugin that enables you to insert many codes like Google Analytics, Facebook Pixel, custom CSS etc. to the header and footer of your WordPress website.

Follow the steps mentioned below for using this plugin:

  • Install the ‘Insert Headers And Footers’ plugin and activate it.
  • Login to your Google Analytics account and copy the tracking code for your website.
  • Go to the ‘Settings’ for the plugin.
  • Paste the Google Analytics tracking code in the ‘headers’ section.
  • Save the changes.

Option 3 : Connect WordPress And Google Analytics Through MonsterInsights

MonsterInsights is another useful WordPress plugin that enables you to add Google Analytics to your WordPress website. MonsterInsigts also offers advanced tracking options and provides you with a Google Analytics dashboard in the WordPress admin area so that you can view the real time stats and data about your website.

Here’s how you can use this plugin:

  • Install the ‘Google Analytics by MonsterInsights’ plugin and activate it.
  • Go to ‘Settings’ under the ‘New Analytics’ menu in the WordPress admin bar.
  • Connect your Google Analytics account to your website through any of these two ways mentioned below:
    • Authenticate the plugin through your Google account : If you are logged in to your Google Analytics account, click on ‘Authenticate’ and follow the instructions after that.
    • Enter the UA (user account) code manually : Check this box – ‘Manually enter your UA code’. After checking this box, paste your Google Analytics tracking code along with your UA number.
  • Save the changes.

An Important Note:

Google Analytics will only start tracking the data of your website from the time when it was connected to your website. You might not be able to view the data right away. You need to give approximately 24 hours to Google for crawling your website and then you will start seeing data about your website traffic and visitors.

Faizan Khan
19
Latest News
Prev PostHow To Add Your Company Logo To Your WordPress Site?May 14, 2024
Next PostHow To Fix A Responsive WordPress Theme To Look Good On Mobile Screen?May 14, 2024

Related items

otpless-issue
Latest News

OTPLess Not Working? Here’s What Happened!

Imagine this: You run a business, and suddenly, your customers can’t log in to your websit

SoftMaji InfoTech
20/06/2025
8
Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
149
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
135
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.