Skip to content
INSTALL BY CMS

WordPress / WooCommerce — installing server-side tracking

A step-by-step guide for WordPress 6.x and WooCommerce: the GTM4WP plugin, an sGTM container in DataNostro, DNS, Consent Mode v2.

10 min Read Středně pokročilý Updated 5.6.2026

A guide to getting server-side tracking running on a WordPress / WooCommerce store via DataNostro. No custom plugin — we use the official Google Tag Manager web container + GTM4WP or Site Kit for the dataLayer, and DataNostro as the sGTM server.

Who this guide is for

  • WordPress 6.x with or without WooCommerce
  • If you only measure marketing sites (not a store) — you'll skip the "WooCommerce dataLayer" section
  • Time: 60–90 minutes for the first setup, 15 minutes for an additional domain

What you'll need

  1. WordPress admin access (Administrator role)
  2. A Google Tag Manager account — a web container + sGTM container
  3. DNS access for the tracking subdomain (e.g. track.yourstore.cz)
  4. A DataNostro account and a created container

Step 1 — Install the GTM web container + a dataLayer plugin

If you don't have GTM yet:

  1. WP Admin → Plugins → Add New → search for GTM4WP (Duracell Tomi's Google Tag Manager for WordPress) → Install + Activate.
  2. WP Admin → Settings → Google Tag Manager → enter your GTM container ID (GTM-XXXXXX).
  3. Container code placement: Footer of <body> (most compatible). For the Schrems II zone, choose Custom and insert the code into the theme.

For WooCommerce, in GTM4WP tick Integration → WooCommerce = Standard. The plugin then emits dataLayer events in the Universal Analytics format productImpressions, addToCart, checkout, purchase. That's the shape DataNostro understands by default.

Alternative for the newer GA4 dataLayer: the official WooCommerce Google Analytics plugin → emits GA4 events view_item, add_to_cart, purchase directly. If you're starting a new implementation, go here — it saves you a few transformations in the GTM workspace.

Step 2 — Deploy the sGTM container in DataNostro

  1. In GTM (Google Tag Manager), create a new "Server" type container (alongside the existing Web container).
  2. Download the Server Container Config as JSON (Admin → Export Container).
  3. In the DataNostro dashboard → Containers → Create new → upload the JSON.
  4. DataNostro returns the endpoint URL (e.g. track.yourstore.cz) and DNS instructions.

Step 3 — Set up DNS for the tracking subdomain

At your DNS provider (Cloudflare, Wedos, GoDaddy…) add a CNAME or A record per the instructions from the DataNostro dashboard. Example for Cloudflare:

Type:   CNAME
Name:   track
Target: containers.datanostro.com
TTL:    Auto
Proxy:  DNS only (orange cloud off — sGTM needs a direct hit)

After DNS propagation (5–60 min) DataNostro automatically issues a Let's Encrypt SSL.

Step 4 — Switch Web GTM to the server-side endpoint

In Google Tag Manager (web container):

  1. Open the GA4 Configuration tag (or the Meta Pixel tag).
  2. In Fields to Set add:
    Field: server_container_url
    Value: https://track.yourstore.cz
  3. Do the same for all GA4 Event tags and (optionally) the Meta Pixel.
  4. Publish the GTM workspace (Submit → Publish).

From this point, all GA4 hits and CAPI requests from browsers will fly to track.yourstore.cz instead of www.google-analytics.com and graph.facebook.com.

Step 5 — Connect the platforms in DataNostro

In the dashboard → Platforms, connect them one by one:

PlatformWhat you needWhere to find it
GA4Measurement ID + API SecretGA4 admin → Data Streams → Measurement Protocol
Meta CAPIPixel ID + Access TokenEvents Manager → Settings → Generate access token
SklikAccount ID + API TokenSklik admin → My account → API token
HeurekaAffiliate IDHeureka order tracker

Step 6 — Test end-to-end

  1. In the DataNostro dashboard → Containers → Send a test event (a purchase test).
  2. In GA4 → DebugView, verify the event arrived.
  3. In Meta Events Manager → Test Events, verify the Meta CAPI hit.
  4. On the site, make a real order for a test CZK 1 → verify all the destinations.

Common problems

"I'm not getting events into GA4"

Check in the browser's Network tab where the /g/collect request goes. If to www.google-analytics.com, the GA4 tag isn't redirected — go back to Step 4. If to track.yourstore.cz but you get a 4xx, look at DataNostro Activity — you'll see the error detail.

"The WooCommerce dataLayer has the wrong prices (with VAT / without VAT)"

In GTM4WP → Integration → WooCommerce you'll find a Send tax with revenue toggle. CZ market = usually Yes (prices with VAT).

"The cookie banner blocks the dataLayer"

If you use Cookiebot / Cookieyes, dataLayer events are only sent after consent. Set up Consent Mode v2 so that analytics_storage and ad_storage align with the tagging rules in GTM. DataNostro respects Consent Mode signals by default.

Next steps

Did this article help you?
✓ Thank you for the feedback