google analytics 4 native on every wordpress site.
paste a measurement ID, save, and gtag.js loads in `<head>` on every page — already gated against the visitor's analytics consent. no GA plugin, no functions.php edits, no manual GTM container just to fire one tag.
free trial. no credit card. all 30 integrations included on every plan.
GA4 layers inside every wordpress site.
Most WordPress hosts treat tracking as the customer's problem. You install a GA plugin, then a consent banner plugin, then a tag manager plugin, then realize the page cache strips your gtag because someone added it after the cache layer.
the gtag snippet, consent-pre-initialized.
consent default is denied. once the visitor's analytics_storage signal flips to granted, gtag retroactively replays buffered events. no lost pageviews, no consent race.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EXAMPLE07"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'analytics_storage': 'denied',
'ad_storage': 'denied'
});
gtag('js', new Date());
gtag('config', 'G-EXAMPLE07');
</script>paste a G- measurement ID. ship.
the dashboard validates the `G-` shape at save time. an MU-plugin renders the gtag snippet on every front-end page, in the right `<head>` position, gated against the visitor's analytics consent state.
find Google Analytics 4 in the Yovale dashboard's tracking panel.
regex `^G-[A-Z0-9]{4,20}$` enforced before save.
snippet renders in `wp_head` priority 1 on the next request.
G-EXAMPLE07GA4 issues this when you create a Web data stream. format: `G-` followed by 4–20 uppercase letters or digits.
^G-[A-Z0-9]{4,20}$page_viewsession_startfirst_visituser_engagementrequest → DebugView in under 300ms.
how a single pageview moves through the Yovale stack into Google Analytics 4. cache stays valid because the consent state lives client-side, not in the cache key.
request hits Yovale origin
PHP-FPM builds response with gtag in `<head>`
edge cache stores HTML, gtag included
browser reads consent class on `<html>`
gtag fires with consent state passed
event lands in GA4 DebugView
three ways to ship GA4 on WordPress, ranked.
the cost isn't the GA4 license — Google gives that away. the cost is plumbing GA4 to fire correctly without breaking the page cache, the consent banner, or the next plugin update.
GA Plugin
- ✗GA4 fires correctly
- ✗Consent Mode v2 wired
- Survives plugin updates
- ✗Zero PHP overhead
yet another plugin, yet another update channel, yet another supply-chain risk.
GTM container only
- GA4 fires correctly
- Consent Mode v2 wired
- Survives plugin updates
- ✗Zero PHP overhead
works but adds ~80kb of GTM JS just to fire one tag.
Yovale Native
- GA4 fires correctly
- Consent Mode v2 wired
- Survives plugin updates
- Zero PHP overhead
renders below WordPress, validated end-to-end, cache-safe.
what ships when you toggle GA4 on.
from the moment you paste the ID to the moment events land in DebugView.
from googletagmanager.com, async, in `<head>` priority 1.
ad_storage + analytics_storage signaled before any event fires.
dataLayer array initialized before gtag(), so events queue cleanly.
snippet baked into cached HTML, consent state on `<html>` class.
questions before you switch hosts for GA4.
Do I need to install a Google Analytics plugin?
No. Yovale renders the GA4 snippet at the platform layer. Skipping the plugin frees PHP memory, removes one update channel, and removes a common source of broken tracking after WordPress core updates.
Does this work with Google Consent Mode v2?
Yes. The visitor's analytics_storage and ad_storage signals are passed to gtag before any event fires. EU traffic stays compliant under the March 2024 enforcement.
Can I still use GTM alongside GA4?
Yes. Add GTM as a separate integration in the same panel and let it manage GA4 inside the container. Or run GA4 directly through Yovale and skip GTM. Both paths work.
Will my page cache strip the gtag snippet?
No. The snippet is part of the cached HTML, not added per-request. Consent state is checked client-side via a class on `<html>` so the cache key stays simple.
What happens if I paste a wrong measurement ID?
Save is rejected before the integration goes live. The dashboard validates `G-XXXXXXXXXX` shape at save time, and the MU-plugin re-validates at render time so a malformed value can never produce a broken script tag.
other analytics integrations on every site.
manage GA4 + ad pixels + custom tags from a GTM container.
free heatmaps + session recordings to pair with GA4 quantitative data.
cookieless alternative — no consent gate required.
self-hostable, GDPR-friendly counter — pairs well with GA4 for redundancy.
ship a WordPress site with GA4 wired in by day one.
free trial. no credit card. paste a G- measurement ID, save, and watch DebugView light up.