Server-side tracking for WordPress with the Measurebase plugin
Copy-pasting tracking snippets into a theme is where WordPress setups go wrong: the snippet lands in the wrong spot, a theme update eats it, and nobody notices until the numbers dip. The Measurebase plugin removes the copy-paste step entirely - you connect your account, enter your GTM web container ID, and the plugin installs and maintains the tags itself.
What the plugin does
- Installs the tags for you. The first-party tracking script prints at the very top of the page on every load. With the ad-block protection power-up on, that script carries the guard itself; a separate guard tag is optional, for tracking that runs outside Tag Manager.
- Speaks GA4 out of the box. With WooCommerce active you get the full ecommerce dataLayer - view_item, lists with positions, add and remove from cart, view_cart, checkout steps, purchase - covering the classic theme flows and the block cart and checkout alike. Events carry the mb_ prefix by default so they never collide with what your theme already pushes, and purchase keeps its standard name.
- Backs every purchase up server-side. When an order is paid, the plugin sends the purchase from your server to your tagging domain too - through a retry queue with backoff, so a hiccup never loses an order. Refunds and subscription renewals ride along, and everything is deduplicated against the browser event by order ID.
- Captures identity at checkout. Analytics and advertising identifiers are captured in the buyer's own request and attached to the server-side purchase; contact details are SHA-256-hashed before they ever leave, and the visitor's IP is masked at capture.
- Tracks your lead forms. Successful submissions from Contact Form 7, WPForms, Gravity Forms, Ninja Forms, Fluent Forms and Elementor Pro push a generate_lead event with the form's identity (name and id) plus the submitter's email and phone, SHA-256-hashed in the browser for enhanced conversions - only on validated, successful submissions, and never the raw values.
- Plays nice with consent banners. Pick your consent tool (Cookiebot, Complianz, iubenda, OneTrust, Usercentrics) and every printed tag carries that vendor's own documented do-not-block attribute - because GTM should load unconditionally and enforce consent itself via Consent Mode. There is also an optional Consent Mode v2 defaults block for sites without a banner that sets them.
- Shows you it works. A setup checklist walks connect → container ID → script → first hit, and the Test tab shows live health: the last request that reached your tagging domain, the last parsed GA4 event, and the ad-block detection status.
Install in two minutes
- Install and activate the plugin, then open Settings → Measurebase.
- Hit Connect with Measurebase: you approve the connection on a consent screen in your own dashboard - least privilege, write access only if you tick it.
- Enter your GTM web container ID on the Tracking tab and save.
- That's it. The checklist confirms each step, ending with your first hit arriving.
🚀 Early access
Download the current version under Resources → Downloads in your dashboard. Questions about the install? Get in touch.
It adapts to the setup you already have
- Already load the script yourself? Tell the plugin and it prints no loader - the events, identity capture and server-side backup keep working, and the homepage scan verifies your own script is actually loading.
- Match your feeds. Choose whether item IDs use the product ID or the SKU, so dynamic remarketing keeps matching your Merchant Center feed; brands and list positions ride along.
- Keep yourself out of the numbers. An optional setting stops all tracking for logged-in administrators - while the server-side backup still reports every real order.
- Privacy tooling included. The identity signals stored with orders are exportable and erasable through WordPress's own privacy tools, and the plugin suggests a privacy-policy paragraph.
🧩 One import for your container
The GTM templates page in the dashboard has a WordPress mode: it generates a complete web-container import whose triggers match the plugin's mb_-prefixed events exactly - tags, triggers and variables in one download, including the enhanced-conversions wiring and the browser-versus-server purchase dedup.