🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Account Get it free
Tracking Code for Google Analytics icon
Possibly abandoned Tested up to 6.6.0

Tracking Code for Google Analytics

Tracking Code For Google Analytics is a simple, lightweight WordPress plugin for inserting your Google Analytics Universal Analytics tracking code. The plugin does one thing and one thing only; prints the standard…

Active installs100+100+ tier
Downloads · 30d144▲ +51.6% vs prev. 30d
Rating—0 reviews
Health score25/100At risk
All-time downloads5.9KSince Oct 2020
Support resolved—No recent threads
RequiresWP 5.0PHP 7.2+
Downloads · 7d34▼ -12.8% week over week
Our verdict

Consider an alternative

Tracking Code for Google Analyt… shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites and was last updated 2 years ago, and scores 25/100 on our health check.

  • Small user base (100+ active installs)
  • Very few reviews so far
  • No update in 2 years
  • Only tested up to WordPress 6.6 (latest is 7.1)

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

258Aug 31Oct 14Nov 28
Yesterday3
Daily average (1y)2
Peak day11May 5, 2026
Last 12 months747

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Tracking Code for Google An… stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
analytics >100 9,235 Best analytics plugins →
google >100 10,000 Best google plugins →
tracking >100 10,000 Best tracking plugins →
tracking code >100 7,759 Best tracking code plugins →
universal analytics >100 383 Best universal analytics plugins →

Version adoption

Share of active sites per release.

  • 2.0100.0%

About Tracking Code for Google Analytics

From the official readme · v2.0.3

Description

Tracking Code For Google Analytics is a simple, lightweight WordPress plugin for inserting your Google Analytics Universal Analytics tracking code. The plugin does one thing and one thing only; prints the standard Google Analytics tacking script to the <head> of your website. To insert your tracking ID, navigate to Settings > General and then scroll to the bottom of the page.

Composer

composer require claytoncollie/tracking-code-for-google-analytics

Filters

If you want to set the tracking ID without using the wp-admin user interface, use the filter below.

add_filter(
    'tracking_code_for_google_analytics_id',
    /**
     * Set Google Analytics tracking ID.
     *
     * @param string $tracking_id Tracking ID.
     *
     * @return string
     */
    function ( string $tracking_id ) : string {
        $tracking_id = 'UA-7654321';
        return $tracking_id;
    }
);

Definitions

You can also define the tracking ID in your wp-config.php file with the following snippet.

define( 'TRACKING_CODE_FOR_GOOGLE_ANALYTICS_ID', 'UA-7654321' );

Contributing

While the purpose of this plugin is to be very tightly scoped, issues and pull requests are welcome on GitHub. I do not guarantee that everything will be merged or support will be given.

Donate

If you like this plugin and would like to support my work, please consider a small donation via Coinbase.

Installation

  1. Upload tracking-code-for-google-analytics to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Navigate to Settings > General > scroll to the bottom of the page
  4. Insert your tracking ID
  5. Save your changes

Changelog

2.0.3

  • Fix readme markdown
  • Bump patch version to deploy

2.0.2

  • Fix readme markdown
  • Bump patch version to deploy

2.0.1

  • Patch version bump to deploy properly

2.0.0

  • Major version. Possible breaking changes. Test locally before updating.
  • Change callback names. Possible breaking change.
  • Bump PHP required version to 7.2
  • Add PHP Namespaces
  • Add PHP parameter type hinting
  • Add PHP return type hinting
  • Add automated static analysis GitHub action
  • Add automated code linting GitHub action
  • Add automated acceptance tests GitHub action
  • Add automated WordPress version checker GitHub action
  • Add donation link to Coinbase
  • Fix URLs in readme files
  • Fix markdown syntax for changelog in readme.txt
  • Ignore phpstan config from deployed plugin
  • Ignore CONTRIBUTING.md from deployed plugin

1.1.0

  • Add ability to define tracking in wp-config.php
  • Update documentation
  • Test with WordPress 6.0.0

1.0.1

  • Update documentation
  • Test with WordPress version 5.6.0

Full changelog on WordPress.org →

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best Tracking Code for Google Anal… alternatives

All analytics plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 Site Kit by Google – Analytics, Search Console, AdSense, Speed Site Kit by Google Site Kit is a one-stop solution for WordPress users to use everything Google has to offer… by Google 5M+ ★★★★★★★★★★ 4.2 (1K) 2 weeks ago 92
2 MonsterInsights – Google Analytics Dashboard for WordPress (Website Stats Made Easy) MonsterInsights The best free Google Analytics plugin for WordPress. See how visitors find and use your… by chriscct7 2M+ ★★★★★★★★★★ 4.5 (3.2K) 2 months ago 93
3 WP Statistics – Simple, privacy-friendly Google Analytics alternative WP Statistics Cookieless, privacy-friendly WordPress analytics. Clear graphs and visitor data kept on… by VeronaLabs 500K+ ★★★★★★★★★★ 4.1 (763) 2 days ago 90
4 GA Google Analytics – Connect Google Analytics to WordPress GA Google Analytics – Connect Google Analytics to WordPress Adds Google Analytics tracking code to your WordPress site. Supports many tracking features. by Jeff Starr 400K+ ★★★★★★★★★★ 4.9 (159) 22 hours ago 97
5 ExactMetrics – Google Analytics Dashboard for WordPress (Website Stats Plugin) ExactMetrics Connects Google Analytics with your WordPress site. Displays stats to help you understand… by Syed Balkhi 200K+ ★★★★★★★★★★ 2.5 (1.5K) 2 months ago 80
6 Head, Footer and Post Injections Head, Footer and Post Injections Head and Footer plugin lets you to add HTML code to the head and footer sections of your… by Stefano Lissa 200K+ ★★★★★★★★★★ 4.9 (735) 8 months ago 53
7 Burst Statistics – Simple WordPress Analytics (Google Analytics Alternative) Burst Statistics Simple, lightweight WordPress analytics with privacy-friendly visitor tracking. Cookieless… by Burst Statistics B.V. 200K+ ★★★★★★★★★★ 4.9 (191) 3 weeks ago 94
8 HubSpot All-In-One Marketing – Forms, Popups, Live Chat HubSpot All-In-One Marketing – Forms, Popups, Live Chat The CRM, Sales, and Marketing WordPress plugin to grow your business better. Capture and… by HubSpot 200K+ ★★★★★★★★★★ 4.3 (207) 3 days ago 81
9 UserFeedback – Create Interactive Feedback Form, User Surveys, and Polls in Seconds UserFeedback Ultimate user feedback plugin to ask questions, surveys, polls, from your website in seconds by Syed Balkhi 200K+ ★★★★★★★★★★ 4.8 (311) 2 months ago 82
10 Post Views Counter Post Views Counter Count and display post views, track site-wide visits, and see what content works – inside… by dFactory 100K+ ★★★★★★★★★★ 4.9 (1.2K) 5 days ago 96

FAQ

Tracking Code for Google Analytics: quick answers

Straight answers, pulled from live WordPress.org data.

Source: WordPress.org

Is Tracking Code for Google Analyt… free?

Yes. Tracking Code for Google Analyt… is free to download and use from the official WordPress.org plugin directory.

Is Tracking Code for Google Analyt… safe to use in 2026?

Tracking Code for Google Analyt… shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites and was last updated 2 years ago, and scores 25/100 on our health check.

How many websites use Tracking Code for Google Analyt…?

Tracking Code for Google Analyt… is active on 100+ WordPress websites and has been downloaded 5,910 times since it launched in October 2020. It was downloaded 144 times in the last 30 days.

Does Tracking Code for Google Analyt… work with WordPress 7.1?

Tracking Code for Google Analyt… is officially tested up to WordPress 6.6.0, while the latest release is 7.1.5. It may still work, but try it on a staging site first.

What PHP version does Tracking Code for Google Analyt… need?

Tracking Code for Google Analyt… requires PHP 7.2 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was Tracking Code for Google Analyt… last updated?

The latest version, 2.0.3, was released on July 5, 2024 (2 years ago).

Who makes Tracking Code for Google Analyt…?

Tracking Code for Google Analyt… is developed and maintained by Clayton Collie.

What are the best alternatives to Tracking Code for Google Analyt…?

The most popular alternatives to Tracking Code for Google Analyt… are Site Kit by Google (5M+ installs), MonsterInsights (2M+ installs) and WP Statistics (500K+ installs).

Powered by PageForge

One template and a spreadsheet. A real page for every search.

PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.

  • CSV and XLSX, plus Google Sheets on Professional and Enterprise
  • Its own title, URL, SEO fields and schema for every page
  • Works with the block editor, Elementor, Divi and Avada
  • Free on WordPress.org, no credit card

↑↓ to move↵ to open