Stand up one unified, fleet-wide tagging system across 197 record-store sites, fixing the two gaps that cost Broadtime its most valuable data: cart/checkout pages aren't tagged, and GA4 records no e-commerce transactions or revenue.
01 The architecture decision
| Model | Maintenance | Store-level ownership | Fleet reporting | Verdict |
|---|---|---|---|---|
| A · Per-site everything 197 containers + 197 GA4 properties |
Poor: one change = 197 republishes; version drift | Native | None without 360 / BigQuery union | Unscalable to maintain |
| B · One container, one property + segments / filters only |
Easy | Can't give a store clean access to just its rows | OK, but capped: 50 data streams/property | Loses store ownership; stream limit |
| C · Hybrid Recommended 1 shared container → dual GA4 |
Easy, one container, one publish | Per-store property keeps ownership | Single roll-up property, keyed by store_id |
Best of both, scales cleanly |
One shared GTM container on every site (a hostname lookup sets each store's identity + destination), feeding dual GA4 tagging: every store keeps its own GA4 property for ownership and clean store reports, and every event also flows to one fleet roll-up property where a store_id custom dimension powers cross-store analysis.
GA4 caps a property at 50 data streams, so 197 stores cannot each have a stream in one property, and GA4 has no row-level access control, so you couldn't hand a store owner just their data. The roll-up therefore uses one stream for all sites, separated by store_id, and ownership lives in the per-store properties.
02 How it flows
GTM-XXXX on every site. Hostname lookup → store_id, brand, GA4 destination. GA4 + Google Ads + Meta live here. One publish → all sites.store_id: cross-fleet reportingEach e-commerce event is sent to two destinations: the store's measurement ID (from the lookup) and the constant fleet ID. The marketplace's single-checkout-across-stores is the one place that also needs GA4 cross-domain measurement.
03 The e-commerce gap & the fix
Today GA4 sees pageviews but no commerce, so there's no revenue, no funnel, no product performance. The fix is the standard GA4 recommended e-commerce events, pushed to the dataLayer at each step.
| Event | Fires when | Shopify (~30) | Tuneportals (~167) |
|---|---|---|---|
view_item | Product page view | Theme dataLayer | Template dataLayer |
add_to_cart | Add / cart page | Theme + Web Pixel | Cart app dataLayer |
begin_checkout | Checkout starts | Web Pixel (Customer Events) | Stripe cart dataLayer |
purchase | Order complete | Web Pixel (checkout is locked on non-Plus) | Server-side from Stripe webhook |
Shopify checkout is locked on non-Plus plans; the only supported way to fire purchase is the Customer Events / Web Pixel API in the admin, not theme code. Tuneportals' cart is being rewritten on Stripe; that's the moment to bake the dataLayer events in and add a server-side purchase (Measurement Protocol) off the Stripe success webhook, so revenue is captured even if the browser tag never fires.
03b Behavior analytics: Microsoft Clarity
Heatmaps and session recordings ride the same shared container.
Add the official Microsoft Clarity GTM template tag once, and bind its Project ID to a clarity_project_id column in the same hostname lookup that already drives store_id and the GA4 measurement ID. Each store records into its own Clarity project (clean per-store heatmaps); the only recurring per-store task is creating that project to mint its ID. A single pooled project (one constant ID for the whole fleet) is the even-simpler fallback.
- Free and unmetered: no per-session billing, so the fleet's millions of monthly sessions cost nothing.
- Consent-gated: sits behind the container's Consent Mode v2 like every other tag; confirm input-masking per store.
- Reporting-ready: the branded dashboard's Clarity panel pulls Clarity's Data Export API per store, so it lights up once each project + export token exist.
On the very highest-traffic stores Clarity samples which recordings it keeps (heatmaps + metrics stay complete). Reconfirm current Clarity limits/template before rollout.
04 Examples
a · Hostname → store lookup (one GTM variable drives everything)
// GTM Lookup Table variable: "Store Config", keyed on {{Page Hostname}}
{
"southmetromusic.com": { store_id: "south-metro", mid: "G-SMM54321", brand: "South Metro" },
// …196 more…
}
// Fleet roll-up is a constant, same for all sites:
const FLEET_MID = "G-FLEET00000";
b · The purchase event (push to dataLayer, Shopify theme or Tuneportals cart)
dataLayer.push({ ecommerce: null }); // clear the previous object
dataLayer.push({
event: "purchase",
store_id: "licorice-pizza", // → roll-up custom dimension
ecommerce: {
transaction_id: "LP-10492",
value: 41.98, currency: "USD", tax: 3.10, shipping: 5.00,
items: [{
item_id: "0093624912", // UPC
item_name: "Rumours, Fleetwood Mac (LP)",
item_brand:"Warner", item_category:"Vinyl", item_variant:"Reissue",
location_id:"Broadtime Alliance", // distributor (AEC/AMS), warehouse vs in-store
price: 36.98, quantity: 1
}]
}
});
c · Send each event to BOTH destinations (store + fleet)
// GA4 event tag in GTM → "Send to" two measurement IDs:
destination_ids = [ {{Store Config}}.mid, FLEET_MID ]
// store_id registered once per property as an event-scoped custom dimension
// Admin → Custom definitions → "store_id" (also "location_id")
d · Server-side purchase, Stripe webhook → Measurement Protocol (Tuneportals reliability)
POST https://www.google-analytics.com/mp/collect
?measurement_id=G-FLEET00000&api_secret={{op://Broadtime/GA4-MP/api_secret}}
{
"client_id": "<ga client_id captured at checkout>",
"events": [{
"name": "purchase",
"params": {
"transaction_id":"TP-88231", "value":41.98, "currency":"USD",
"store_id":"vinyl-groove",
"items":[{"item_id":"0093624912","price":36.98,"quantity":1}]
}
}]
}
// Fire the same payload to the store's own MID. api_secret stays in 1Password, never in code.
05 Provisioning at scale
Onboarding a store must be a script, not a manual GA4/GTM session. Automate with service accounts:
- GA4 Admin API: create the per-store property + data stream, register
store_id/location_idcustom dimensions, markpurchasea key event. - GTM API: add the store's row to the lookup table and publish once; the shared container picks it up everywhere.
- Search Console API: add/verify the property and link it to GA4.
- Consent Mode v2: wire default + update in the shared container so EU traffic and Google Ads stay compliant by default.
06 Reporting: the PixelCove engine
The packaged, repeatable deliverable is PixelCove's own white-label reporting engine, not a third-party tool. It reads the GA4 Data API via a service account, renders a fully brand-skinned, self-contained HTML dashboard, and deploys it static + noindex.
- Rolled-up (fleet): run the engine against the roll-up property → whole-fleet dashboard.
- Rolled-down (per-store): the same template with a
store_idfilter → that store's view. Same build, no rebuild.
Stores wanting a no-code live view can additionally be pointed at Google Data Studio, the product Google renamed back from "Looker Studio" in April 2026, on their own property, but the engine is the primary branded deliverable.
06b Historical data: federate, don't migrate
GA4 has no way to merge historical event data into another property; the new roll-up starts empty at cutover. So we don't migrate; we keep every existing per-store property as the rolled-down history layer and let the report read the right property by date: per-store views read each store's own property (full history retained in place); the fleet view reads the roll-up going forward.
The recoverable history is traffic only: there is no historical revenue, because commerce was never tracked (the gap this project fixes). A one-time aggregate export is worth doing only to beat GA4's ~14-month retention wall on event-level data, or to avoid fanning out across ~190 properties; neither is pressing here.
07 Limits to plan around
| Constraint | Standard tier | Implication |
|---|---|---|
| Data streams / GA4 property | 50 | Drives per-store properties + a store_id-keyed roll-up stream |
| Properties / account | 100 (request more) | 197 spread across broadtime 1–4 accounts |
| Event-scoped custom dims / property | 50 | store_id, location_id, etc. fit easily |
| Report cardinality before "(other)" | ~500/day | 197 store_ids report cleanly |
Verify before provisioning. GA4/GTM limits change. Confirm current numbers in Google's official docs before scripting the rollout.