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

How to add Google Analytics to WordPress with and without using plugin?

HomeHow to add Google Analytics to WordPress with and without using plugin?

Offer Expire Soon..


Only New User..


This article guides you on how to add Google Analytics to your WordPress in two different ways.

Table of Contents

Toggle
  • Why add Google Analytics to WordPress?
    • Method 1: Adding Google Analytics to WordPress using plugin :
    • Method 2: Adding Google Analytics to WordPress by editing the theme :

Why add Google Analytics to WordPress?

Google Analytics provides you with very detailed statistics about your website and the traffic coming to it. But, to use Google Analytics with a WordPress or any other site, first, you need to sign-up for a Google Analytics account at http://www.google.com/analytics and get a unique Tracking ID.

Once you set up the Google Analytics account and get the Tracking ID for your site, you can easily configure WordPress to it. You can do this, in two ways :

(i) By using a WordPress plugin.

(ii) By editing the WordPress theme.

Method 1: Adding Google Analytics to WordPress using plugin :

There are various plugins available that enable you to configure Google Analytics for a WordPress site, and they all function in one and the same ways. You just need to specify your Tracking ID, and the plugin will work as required.
Some of the popular Google Analytics plugins for WordPress are :

Google Analytics for WordPressGoogle Analyticator

Google Analytics

Method 2: Adding Google Analytics to WordPress by editing the theme :

Plugins seem to be convenient, but they carry processing overhead with them that may affect the site performance. If you don’t use a plugin then you can edit the WordPress theme directly to enable Google Analytics.

# Perform the following steps to enable Google Analytics by editing the theme :

1. Log in to your Google Analytics account.

2. Click on Admin, again click on Tracking Info, and then click on Tracking Code. Now copy the entire text in the tracking code box, including the starting <script> tag and the ending </script> tag.

3. Now, login to WordPress as an administrator.

4. Under the Dashboard, click on Appearance, and then on Editor. The Edit Themes page gets appear.

5. Go to Templates and under it click Header (header.php).

6. Identify the ending </head> tag. Just above this </head> tag, paste the Tracking ID code snippet from Google Analytics that you have got from Step 1.

Ensure that you include the starting <script> tag and the ending </script> tag.

7. Click on the Update File. Google Analytics will now be enabled for all pages on your WordPress site.

It may take up to 24 hours for Google Analytics to change its status from Tracking Not Installed to Receiving Data.

Also Read :

1) Steps to Disable WordPress Plugins Without Accessing the WP – Admin

2) How to disable all WordPress plugins directly from the database?

Faizan Khan
17
Latest News
Prev PostHow to enable maintenance mode in WordPress?May 14, 2024
Next PostHow to fix blank pages in WordPress?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.