← All resources Tutorial

Installing Measurebase on a WooCommerce shop

On WordPress the tracking snippet usually lives in a theme file or a header plugin, and on WooCommerce the data layer is a second plugin again. The Measurebase plugin replaces both: it prints the first-party loader, pushes the GA4 e-commerce events from the classic and block flows, backs every paid order up from your server and can serve the tagging from a path on your own domain. This guide installs it on a WooCommerce shop from start to first purchase.

Before you start

Step 1 · Install the plugin

Download the current zip under Resources → Downloads in your Measurebase dashboard, then in WordPress go to Plugins → Add New → Upload Plugin, upload it and activate. Updates work the same way: upload the new zip and WordPress offers to replace the current version.

Step 2 · Connect your account

Open Settings → Measurebase and click Connect with Measurebase. You land on a consent screen in your own dashboard. The connection is read-only unless you tick the write access box; tick it if you want the plugin to manage Enhanced Ad Blocker Protection or send cost prices for Profit Tracking. Back in WordPress the plugin lists your domains and matches the one for this site. Your admin on plain HTTP? The Connection tab has an advanced fallback with an API token from Settings → API tokens in the dashboard.

Step 3 · The Tracking tab

Step 4 · The WooCommerce tab

With WooCommerce active the plugin pushes the standard GA4 events into the data layer: view_item, view_item_list with list positions, add_to_cart, remove_from_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info and purchase, in the classic templates and in the block cart and checkout. Events carry the mb_ prefix by default so they never collide with another plugin's pushes; the purchase keeps its plain name.

Step 5 · Import the matching GTM template

Go to Resources → GTM templates in the dashboard, pick the WordPress plugin data layer under Configuration and your destinations, and download the web and server imports. The web import's triggers listen to the mb_ events exactly, the GA4 tags keep the standard names, the enhanced-conversions variable reads the hashed fields the plugin pushes, and the purchase carries mb_event_id so the server copy is deduplicated. Keep the prefix in the plugin and in the builder the same.

Step 6 · Serve it from your own domain (optional)

Safari caps cookies set by a tagging subdomain that runs on another server at 7 days. The plugin can forward a path on your own site, /mb by default, to your tagging server, so the cookies come from your own address and keep their full lifetime. Turn on Same-Origin Tracking for the domain in the dashboard, choose WordPress, then switch it on in the plugin's Tracking tab and run the dashboard's check. It needs HTTPS and PHP cURL, it never forwards WordPress or WooCommerce session cookies, and WP Rocket, LiteSpeed Cache and Autoptimize are told to leave the Measurebase scripts and the path alone. Subdirectory installs cannot use it.

Step 7 · Test it

The plugin's setup checklist walks connect, container ID, script and first hit. The Test tab shows the last request that reached your tagging subdomain, the last parsed GA4 event, the ad-block detection status and your plan; Site Health warns when the body snippet could only be placed late or tracking is paused. Place a test order and check the domain's request logs in the dashboard: the browser purchase and the server-side backup arrive with the same order ID.

Lead forms

Successful submissions from Contact Form 7, WPForms, Gravity Forms, Ninja Forms, Fluent Forms and Elementor Pro push generate_lead with the form's name and ID plus the submitter's email and phone, hashed in the browser. The GTM import fires its lead tags on that event.

Frequently asked questions

Does it work with the block checkout?

Yes. Add to cart and remove from cart in the block cart and mini-cart, shipping and payment info in the block checkout, and the purchase on the block order confirmation are all covered, as is high-performance order storage.

Does the server-side backup send consent signals?

No. The server has no consent signal of its own, so the relay sends none; consent handling stays in your web container, which gates the browser event.

Multisite?

Each site connects on its own; a subdirectory network shares one host and therefore one Measurebase domain, with a GTM container per site. Network admins get a read-only overview, and uninstall cleans every site.

Continue reading

Ready to move your tagging to Europe?

Start free, no credit card required. Live in about 15 minutes.

Start free