Skip to main content

GTM Server-Side (dev view)

Informational page. GTM config is owned by the agency. Read this if you want to understand what happens downstream of your dataLayer.push calls.

Diagramโ€‹

Browser GTM Web (client-side) GTM Server (Stape)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
dataLayer.push โ”€โ”€โ”€โ”€โ–บ 1 GTM Web container โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”œโ”€โ–บ Meta Pixel (browser) โ”‚ Server container โ”‚
โ”œโ”€โ–บ Google Ads tag โ”‚ โ”€ Tag: Meta CAPI โ”‚
โ””โ”€โ–บ GA4 Client โ”€โ”€HTTPSโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚ โ”€ Tag: GA4 MP โ”‚
โ”‚ โ”€ Tag: GAds CAPI โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ–ผ
Meta + Google APIs

Why 2 containers?โ€‹

  • GTM Web (client) โ€” places Meta Pixel in the browser (for _fbp / _fbc), tags Google Ads remarketing. Forwards a GA4 event to the server.
  • GTM Server โ€” receives that event, enriches it (server IP, UA, hashes PII), and fans out to Meta / GA4 / Google Ads server APIs.

Client-side tagsโ€‹

Configured by the agency in GTM Web:

Trigger (Custom Event)Fired tags
view_itemMeta Pixel ViewContent, GA4 Event view_item
add_to_cartMeta Pixel AddToCart, GA4 Event add_to_cart, GAds remarketing
begin_checkoutMeta Pixel InitiateCheckout, GA4 Event begin_checkout
add_payment_infoMeta Pixel AddPaymentInfo, GA4 Event add_payment_info
purchaseMeta Pixel Purchase, GA4 Event purchase, GAds Conversion
sign_upMeta Pixel CompleteRegistration, GA4 sign_up
generate_leadMeta Pixel Lead, GA4 generate_lead, GAds Lead

Server-side tagsโ€‹

The GA4 client forwards all events to the GA4 Client tag in the server container at analytics.biosphereskincare.com.

Server-side, the agency configures:

Server tagAction
GA4Forwards the event to GA4 (Measurement Protocol)
Meta Conversions APISends to Meta (with SHA-256 hashed PII and same event_id as Pixel for dedup)
Google Ads ConversionSends conversion to Google Ads (Enhanced Conversions)

Subdomainsโ€‹

SubdomainRole
load.analytics.biosphereskincare.comServes gtm.js and ns.html first-party
analytics.biosphereskincare.comReceives server-side hits from GA4 client

CNAMEs to create (values from agency):

load.analytics.biosphereskincare.com CNAME <id>.stape.io
analytics.biosphereskincare.com CNAME <id>.stape.io

See Stape subdomain for details.

DataLayer variablesโ€‹

The agency creates these variables in GTM Web to read what you push:

GTM variabledataLayer path
DLV - ecommerceecommerce
DLV - ecommerce.itemsecommerce.items
DLV - ecommerce.valueecommerce.value
DLV - ecommerce.currencyecommerce.currency
DLV - ecommerce.transaction_idecommerce.transaction_id
DLV - user_data.emailuser_data.email
DLV - user_data.phoneuser_data.phone
โ€ฆโ€ฆ

โ†’ Your only job is to respect these paths when pushing.

The agency enables Google Consent Mode v2 in GTM via a CMP. ad_user_data / ad_personalization / analytics_storage / ad_storage must be declared BEFORE GTM loads.

You don't filter events on consent โ€” GTM blocks the relevant tags automatically.

CMP โ†” GTM injection order: coordinate with the agency (CMP in <head>, GTM right after).