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…
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 & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where Tracking Code for Google An… stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| analytics | >100 |
| >100 | |
| tracking | >100 |
| tracking code | >100 |
| universal analytics | >100 |
Version adoption
Share of active sites per release.
About Tracking Code for Google Analytics
From the official readme · v2.0.3Description
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
- Upload
tracking-code-for-google-analyticsto the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Navigate to Settings > General > scroll to the bottom of the page
- Insert your tracking ID
- 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
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.
Best Tracking Code for Google Anal… alternatives
All analytics plugins →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
