Google Analytics 4 Setup & Tag Checker
Audit your website for active GA4 Measurement IDs, GTM containers, legacy Universal Analytics bloat, and Google Consent Mode V2.
Auditing Your GA4 Tag Setup the Right Way
1. What This Tool Checks and How
The scan looks for four patterns in your page's raw HTML: a GA4 Measurement ID matching G-XXXXXXXXXX, a GTM container ID matching GTM-XXXXXXX, a legacy Universal Analytics ID matching UA-XXXXX-Y, and consent-related script references (Google's gtag('consent', ...) call, or common consent management platforms like Cookiebot or OneTrust). Because this is a text-pattern match against server-rendered HTML, it will correctly detect the standard gtag.js and GTM snippets that WordPress plugins and most site builders output directly in the page source.
2. How to Use This Checker
Enter your site's URL and click βCheck GA4 Setup.β The results show which GA4/GTM identifiers were found, whether legacy UA IDs are still present, and whether consent-mode signals were detected, along with a pass/warn/fail breakdown and specific recommendations. Run it on your homepage as a quick sanity check, and consider re-running it on a couple of other page types (a blog post, a product page) since some sites only load tags conditionally.
3. Diagnosing Duplicate Pageview Tracking
If the scan detects more than one distinct GA4 Measurement ID, or a GA4 tag configured both directly via gtag.js and again inside Google Tag Manager, you likely have duplicate pageview tracking β a common issue when a theme, a plugin, and a manually-added script all try to configure analytics independently. This inflates session and pageview counts in your reports. The fix is to standardize on one method (ideally GTM alone, since it's easier to manage and audit) and remove the redundant direct gtag.js snippet or duplicate plugin configuration.
4. Why Legacy UA Cleanup Matters for WordPress Speed
Universal Analytics stopped processing new data in mid-2023, so a lingering analytics.js or ga.js snippet does nothing useful β it just adds an extra script download, parse, and execution cost on every page load for no data benefit. On WordPress sites, this often comes from an old analytics plugin that was never fully deactivated, or a UA snippet hand-pasted into a theme's header years ago and forgotten. Removing it is a pure win: less JavaScript to parse and execute, with zero functional loss.
5. Who Should Use This Tool
Useful for a quick sanity check after installing an analytics plugin, migrating a site, or inheriting a client's WordPress install with an unclear tracking setup. It's a fast first-pass diagnostic β not a substitute for opening GA4's own admin panel and Tag Manager's preview mode to fully verify configuration.
6. Limitations
This tool only sees what's present in your page's initial HTML response β tags injected purely by client-side JavaScript after page load (rare for standard GA4/GTM snippets, but possible with custom implementations) may not be detected. It cannot verify whether your GA4 property is actually receiving and processing data correctly, whether conversion events are configured, or whether your Consent Mode implementation is functioning correctly at runtime β those require checking inside Google Analytics and Tag Manager directly (GA4's Realtime report and GTM's Preview mode are the authoritative sources).
Frequently Asked Questions
How does this tool detect Google Analytics 4 (GA4)?
The tool performs a live HTTP fetch to inspect your HTML document for gtag.js script references, GA4 measurement IDs (G-XXXXXXXXXX), Google Tag Manager containers (GTM-XXXXXXX), and Consent Mode signals.
Why should legacy Universal Analytics (UA) tags be removed?
Google officially deprecated Universal Analytics. Keeping legacy analytics.js snippets enqueued in WordPress adds unnecessary JavaScript main thread execution, hurting Core Web Vitals (INP and TBT) without recording data.
What is Google Consent Mode V2?
Consent Mode V2 allows websites to adjust tag behavior based on visitor cookie consent status (e.g. ad_storage and analytics_storage). Google introduced it partly to help sites comply with EU regulatory requirements (including obligations tied to the Digital Markets Act) when using Google advertising products with EEA visitors β check with a privacy professional for your specific compliance obligations.
Does this tool check my actual GA4 property configuration, or just whether a tag is present on the page?
Just the tag. This tool fetches your page's HTML and looks for GA4/GTM identifiers and consent-related script references β it has no access to your Google Analytics or Tag Manager account, so it cannot verify conversion event setup, audience definitions, data stream configuration, or whether the Measurement ID is actually receiving data. Use Google Analytics' own Realtime report to confirm data is actively flowing in.
Why would I see both a GTM container and a GA4 Measurement ID on the same page?
This is common and not necessarily a problem β many sites use Google Tag Manager to deploy GA4 alongside other tags (ads conversion tracking, Meta Pixel, etc.), and the GA4 Measurement ID often appears in the page source as a GTM variable or inside a GTM-injected script. If you see multiple different GA4 IDs (not just one repeated), or GA4 configured both directly via gtag.js and again inside GTM, that can cause duplicate pageview counting and inflated numbers β verify in GA4's DebugView which is worth investigating.
