Code Library
Production-correct snippets. De-identified. Module-mapped to the Advanced GTM & Server-Side Tracking course.
Filter by module:AllModule 3 · GA4 Base ConfigModule 5 · Consent Mode v2Module 6 · Server-Side GTMModule 7 · Enhanced ConversionsModule 8 · Meta CAPIModule 9 · Cross-DomainModule 10 · Ecommerce
Filter by topic:Allattributioncaddycmpconsent-mode-v2conversions-apicross-domaincustomer-eventsdatalayerdeduplicationdockerecommerceenhanced-conversionsevent_idga4gdprgoogle-adsgtmmeasurement-protocolmeta-capimeta-pixelnextjsprivacypurchaseself-hostedserver-sidesgtmsha256shopifyvps
Module 10 · Ecommerce
GA4 ecommerce purchase dataLayer (generic)
The complete GA4 purchase event dataLayer push. Production-correct schema with all required and recommended parameters.
ga4ecommercedatalayerpurchase
Module 10 · Ecommerce
Shopify purchase dataLayer via Customer Events
Fire the GA4 purchase event from Shopify's Customer Events API (web pixels). Works with the new checkout extensibility without requiring checkout.liquid access.
shopifyga4ecommercecustomer-events