Docs menu · sGTM Variables

Docs / Server-side GTM

Last updated

sGTM Variables Setup

Event Data variables to read delayed purchase events in sGTM

For sGTM Container: Create these Event Data variables to read delayed purchase event parameters. Variable Type: Event Data

Essential Variables (Must Create)

Variable Name Key Path Used For
ED - event_idevent_idFB CAPI deduplication
ED - transaction_idtransaction_idGA4, FB CAPI, Google Ads
ED - valuevalueGA4, FB CAPI, Google Ads
ED - currencycurrencyGA4, FB CAPI, Google Ads
ED - content_idscontent_idsFB CAPI (JSON array)
ED - fbpfbpFB CAPI
ED - fbcfbcFB CAPI
ED - gclidgclidGoogle Ads

Facebook CAPI Variables

Variable Name Key Path Description
ED - content_typecontent_typeAlways "product"
ED - content_namecontent_nameProduct names combined
ED - content_categorycontent_categoryFirst item category
ED - num_itemsnum_itemsTotal quantity
ED - external_idexternal_idCustomer identifier
ED - action_sourceaction_source"website"
ED - event_source_urlevent_source_urlThank you page URL
ED - ip_overrideip_overrideCustomer IP
ED - user_agentuser_agentCustomer browser
ED - fbclidfbclidFacebook Click ID

GA4 & Google Ads Variables

Variable Name Key Path Description
ED - ga_client_idga_client_idGA4 Client ID
ED - shippingshippingShipping cost
ED - taxtaxTax amount
ED - couponcouponCoupon code

Other Platform Variables

Variable Name Key Path Platform
ED - ttclidttclidTikTok Events API
ED - msclkidmsclkidMicrosoft Ads
ED - is_delayedis_delayedDebug flag

User Data Variables (Enhanced Conversions)

Variable Name Key Path Description
UP - emailuser_data.emailCustomer email
UP - phoneuser_data.phoneCustomer phone
UP - first_nameuser_data.first_nameFirst name
UP - last_nameuser_data.last_nameLast name
UP - cityuser_data.cityCity
UP - regionuser_data.regionState/region
UP - postal_codeuser_data.postal_codeZIP code
UP - countryuser_data.countryCountry code

How to Create Variables in sGTM

  1. 1. In sGTM, go to Variables → New
  2. 2. Select Variable Type: Event Data
  3. 3. Enter the Key Path from the table above
  4. 4. Name it (e.g., ED - content_ids)
  5. 5. Save

Official references

We use cookies to enhance your experience, analyze site traffic, and for marketing purposes. By continuing to use our site, you consent to our use of cookies. Learn more