Taking Google Analytics off a WordPress site sounds like deleting one snippet. On a site that’s had a few years of plugins, themes and helpers, the tag is often in two or three places at once, and every copy you miss keeps sending your visitors’ data to Google.
Do it last. Once the tag is off, GA4 stops collecting, and anything you haven’t copied out of it by then stays behind. If you’re moving to Vireo Analytics, import your GA4 history first and check the imported months against GA4’s own reports. Then come back here.
Before you remove anything
Write down your GA4 measurement ID. It starts with G- and you’ll find it in GA4 under Admin, Data streams. That ID is what you’ll search for. If the site is old enough, look for a Universal Analytics ID starting with UA- as well, since its code may still be on the page even though Google stopped collecting it.
Check what else rides on the same code. The Google tag that loads GA4 can also carry Google Ads conversion tracking, with an ID starting with AW-. A Google Tag Manager container, with an ID starting with GTM-, often holds ad pixels and other tags besides GA4. If you run ads, removing the whole tag can break your conversion tracking. In those cases you remove GA4 from inside the tag or container, and leave the rest.
Find every copy
Open your home page in a private window, view the page source, and search it for:
- your
G-ID googletagmanager.comgoogle-analytics.comGTM-
Do the same on a post, a page, and on anything that runs different templates, such as your shop, checkout and order confirmation pages. Some setups only add tracking on the thank-you page.
Page source only shows what the server sent. A tag manager or a script added later can load GA4 without it appearing there. For a second check, open your browser’s developer tools, go to the Network tab, reload, and filter for collect. GA4 sends its data to an address ending in /g/collect. If nothing matches, the page isn’t sending anything to GA4.
Now track down where each copy comes from.
Plugins built to add it
The most common source is a plugin whose job is connecting your site to Google. Site Kit by Google places the GA4 tag when its Analytics module is connected, and plugins that show GA reports in your dashboard usually add the tag too. So do the GA integrations for shop plugins, which send purchase data to Google.
Go to Plugins and look at everything with Google or analytics in its name or description. Disconnect the Analytics part in its settings, or deactivate and delete the plugin if you no longer need it at all. Site Kit also connects Search Console and other Google services, so check what else you rely on it for first.
Header and footer code plugins
Plugins for adding code to every page, such as WPCode (formerly Insert Headers and Footers) and other snippet managers, are the second place to look. Open each one’s header and footer boxes and its list of snippets, and remove the GA code. Leave the plugin if it holds other code you still need.
Theme settings and page builders
Many themes and page builders have a field for header scripts, often under names like “Integration”, “Custom code” or “Tracking code”. Check the theme’s options panel, the Customizer, and the custom code area of any page builder you use. These fields are easy to forget because they live outside the plugin list.
Theme files
A developer may have pasted the tag straight into header.php or footer.php, or added it with a wp_head hook in functions.php. Check the child theme if you have one. If the code is in the parent theme, a theme update may already have removed it, or may put it back after you do.
If you have SSH access, one search covers themes, plugins and must-use plugins at once:
grep -rn --include=*.php "googletagmanager\|gtag(" wp-content/themes wp-content/plugins wp-content/mu-plugins
Expect plenty of matches inside plugins that have Google features and don’t print anything on your pages. The ones to look at are in your theme, in mu-plugins, and in small custom plugins someone wrote for your site.
The database
Tracking code also hides in content: a Custom HTML widget, a block in a footer template part, or a page builder’s saved section. With WP-CLI you can search the whole database:
wp db search "googletagmanager"
Fix each hit in the editor where it lives, rather than editing the database directly.
Google Tag Manager
If GA4 loads through Tag Manager, the snippet on your site is the container, and the GA4 tags live inside it. In Tag Manager, open the container, delete or pause the Google tag and any GA4 event tags, then publish the container. Nothing changes on your site until you publish.
If GA4 was the container’s only job, remove the container snippet from your site too, wherever it was added: a GTM plugin such as GTM4WP, a header plugin, or the theme.
Outside WordPress
Some setups add the tag before the page reaches the visitor. Check your CDN’s settings (Cloudflare Zaraz, for example, can load GA4 without any code on your site) and anything your host offers for injecting scripts.
After you’ve removed it
Clear every cache: your page cache plugin, your host’s cache, your CDN, and any plugin that combines or minifies JavaScript, since a combined file can still hold the old code. Then repeat the checks above in a private window, on the same set of pages.
Over the next day, GA4’s Realtime report should drop to nothing from your site. A trickle can carry on for a while from visitors with old copies of your pages in their browser cache.
Keep the GA4 property. It costs nothing to leave, and if you ever need a GA4-only number, it’s still there to look up.
Tidy up the paperwork
Take GA4 out of your consent tool’s list of scripts and out of your cookie and privacy policies. Vireo sets no cookies and stores nothing on visitors’ devices, so it doesn’t belong in a cookie list. Your privacy policy should still say you use it and how it counts visits. See privacy and GDPR.
Whether you still need a cookie banner depends on what else runs on your site, such as ads, embedded videos or other pixels. Check that list before you take the banner down. GA4 traffic after a cookie banner shows what a banner was hiding.
Last, open Vireo and confirm it’s still counting on the days after the switch. If recording ever stops, Vireo raises a warning in Site Health, so a broken setup doesn’t pass for a quiet week. Compare trends across the switch rather than exact totals: why the numbers won’t match exactly explains the difference.