Tracking & Data Architecture
Tracking & Data Architecture | EARNST
20–40% of your conversion data is missing. Server-side tracking on own infrastructure, Consent Mode v2, enhanced e-commerce, and engagement scoring bring it back.
For you as a campaign manager: Your Smart Bidding algorithms optimize on 60–70% of actual conversions. The missing 30–40% are not randomly distributed: mobile users, Safari users, and privacy-conscious buyers are disproportionately missing. This page shows which tracking gaps directly impact your ROAS and which measures deliver the biggest results.
For you as a decision-maker: With 10,000 EUR monthly ad spend and 30% data loss, you make budget decisions every month based on 7,000 EUR instead of 10,000 EUR of conversion data. Server-side tracking on own infrastructure costs 2,500 to 8,000 EUR one-time and simultaneously saves 50 to 300 EUR monthly in CMP costs. ROI shows in the first quarter.
For you as a developer: SST on own infrastructure with HTTP response header cookies (13 months, ITP-resistant), event deduplication via event_id matching, IntersectionObserver-based engagement scoring with requestIdleCallback. 5 theme files + web pixel + GTM API tooling. No tag-in-tag chaos, no third-party dependencies.
What You Are Losing: and What It Costs
Your tracking loses between 20% and 40% of all conversion data. Browser restrictions, ad blockers, and consent requirements create systematic gaps.
Your Smart Bidding algorithms train on 60–70% of actual conversions. The missing 30–40% are not random: Safari users, mobile shoppers, and ad-blocker users vanish disproportionately. With 10,000 EUR monthly ad spend, you're optimizing campaigns based on 7,000 EUR of conversion data while 3,000 EUR worth of purchases remain invisible. Your ROAS calculations, retargeting audiences, and bid adjustments all reflect a distorted reality where high-intent mobile users are systematically underrepresented.
You are making budget allocation decisions based on incomplete information. With 30% data loss at 10,000 EUR monthly ad spend, every investment decision relies on 7,000 EUR of visible conversions while 3,000 EUR remain untracked. The missing segment often includes privacy-conscious buyers with above-average purchasing power. This systematic blind spot leads to misallocated budgets, underinvestment in profitable channels, and competitive disadvantage against companies with complete attribution. The cost is not just missing data—it's systematic misdirection of your entire marketing investment.
Browser restrictions create three compounding failure modes. Ad blockers (uBlock Origin, Privacy Badger) block 15–30% of tracking requests entirely. Safari ITP deletes client-side cookies after 7 days, breaking attribution for 35–45% of mobile traffic in DACH markets. Without Consent Mode v2 implementation, GA4 cannot apply behavioral modeling to declined consent sessions, losing another 30% of remaining data. These are not independent failures—they compound. A Safari user with an ad blocker and declined consent is completely invisible in standard client-side implementations.
All 9 chapters as a 10-page PDF
Architecture, Consent Mode, server-side tracking, engagement scoring, identity, purchase automation: concise executive summary.
Download PDFNo form, no gate. Questions? [email protected]
Server-Side Tracking on Own Infrastructure
Server-side tracking routes data through your own infrastructure instead of browser-based collection. This makes data collection independent of client-side limitations.
The 15–30% of users blocked by ad blockers suddenly reappear in your conversion data. Every retargeting audience, every Smart Bidding optimization, every ROAS calculation was previously based on a subset that systematically excluded ad-blocker users. With 10,000 EUR monthly ad spend, that's 1,500 to 3,000 EUR of conversion data that was invisible. These users now feed into your Google Ads Smart Bidding algorithms, your Meta Advantage+ campaigns, and your GA4 predictive audiences. The impact shows within the first billing cycle.
Shared hosting solutions create unpredictable cost scaling and vendor dependency. Third-party platforms charge per event volume or pageview—costs increase with business success. Own infrastructure means fixed monthly costs of 30 to 80 EUR regardless of traffic volume. Over 36 months, this saves 1,800 to 10,800 EUR compared to per-event billing models. Additionally: complete data sovereignty, no vendor lock-in, no unilateral price increases, and full compliance control. The setup investment of 2,500 to 8,000 EUR pays back within 12 to 18 months through eliminated subscription fees alone.
Own infrastructure enables HTTP response header cookie manipulation that shared hosting cannot provide. GTM Server Container runs on dedicated infrastructure with nginx reverse proxy, allowing Set-Cookie header injection at the transport layer. This creates true first-party cookies with 13-month Max-Age, correct Domain scope (subdomain.yourdomain.com), SameSite=Lax, and Secure flags. Not JavaScript document.cookie writes that Safari still restricts. Additionally: custom Node.js middleware for event enrichment, direct PostgreSQL writes for offline conversion matching, and custom API endpoints for phone call attribution. Full stack control from OS level up.
Consent Mode v2 + Custom Cookie Banner
Consent Mode v2 enables behavioral modeling for declined consent sessions. Proper implementation recovers approximately 70% of otherwise lost data.
With 40% consent opt-out rate (DACH average), Consent Mode v2 recovers 28 percentage points of data coverage. Without it, every "Reject" click discards the entire session—GA4 sees nothing. With proper implementation, GA4 applies behavioral modeling to reconstruct conversion patterns from declined sessions. This lifts total data coverage from 60% to 88%. For retargeting audiences and Smart Bidding, this means the difference between training on a biased subset versus representative user behavior. The impact is measurable in audience size and campaign performance within two weeks.
External consent management platforms cost 50 to 300 EUR monthly while creating compliance risk. Over 36 months, that's 1,800 to 10,800 EUR for a service that often misconfigures consent signals and creates GDPR audit liability. A custom banner costs 0 EUR monthly, includes full design control, eliminates third-party dependencies, and reduces legal exposure through documented consent flows. The one-time implementation investment pays back within 6 to 12 months through eliminated subscription fees alone, while simultaneously strengthening compliance posture.
Implementation sequence determines whether behavioral modeling works at all. Consent defaults must load before GTM container initialization: window.dataLayer.push(['consent', 'default', {...}]) before the GTM script tag. Most implementations reverse this order, sending initial pageview hits without consent context. GA4 cannot retroactively apply behavioral modeling to these hits. Our implementation: inline consent defaults → localStorage check → GTM init → banner display if no stored consent. Custom banner: zero external dependencies, 2.8 KB gzipped, bilingual DE/EN, WAI-ARIA compliant, localStorage + cookie persistence with 13-month expiry.
API-Based Conversion Attribution
Browser-based conversion tracking fails when scripts do not load or users close tabs before events fire. Server-side attribution is not affected by these client-side limitations.
Every lost conversion is a missing training signal for your bidding algorithms. Browser pixels fail silently—ad blockers block them, users close checkout tabs before pixels fire, browsers restrict cross-domain tracking. Your Google Ads Smart Bidding and Meta Advantage+ campaigns optimize on incomplete conversion data. Server-side conversion delivery ensures every purchase reaches Google Ads and Meta—no browser involvement, no blocking possible. This means complete conversion coverage feeding into your bidding algorithms, resulting in measurably improved ROAS within the first optimization cycle.
Incomplete conversion attribution leads to systematic underinvestment in profitable channels. When 20–30% of conversions go untracked due to browser restrictions, campaign performance appears worse than reality. Budget flows away from channels that actually perform well but suffer disproportionate tracking loss. Server-side attribution closes this gap, revealing true channel performance and enabling evidence-based budget allocation. The business impact is not just better data—it's preventing systematic misallocation of your entire advertising budget based on incomplete information.
Parallel multi-platform API delivery with event deduplication via event_id matching. Meta Conversion API receives server-side events with hashed PII (em, ph, fn, ln via SHA-256) plus fbp/fbc cookies. Google Ads Enhanced Conversions API receives SHA-256 hashed email with gclid/gbraid/wbraid parameter matching. TikTok Events API receives parallel events with ttclid matching. Event deduplication: identical event_id (transaction_id for purchases) across browser pixel and server API ensures 1:1 event matching without double-counting. Implemented as GTM Server Container clients with custom transformation logic.
Enhanced E-Commerce: Measure Every Step in the Funnel
Standard implementations track 3 to 5 events: pageview, add to cart, purchase. Enhanced e-commerce captures 18+ distinct funnel stages.
Smart Bidding algorithms need granular funnel signals to optimize effectively. Standard setups provide 3 data points—you're asking Google and Meta to optimize based on a conversation where you only know the start and end. Enhanced e-commerce provides 18+ events across discovery, consideration, intent, and conversion stages. This feeds your bidding algorithms with 3–5x more training data, enabling more precise bid adjustments. GA4 predictive audiences can distinguish "high product page engagement, no purchase" from "bounced after collection view." Retargeting campaigns can target users based on specific funnel depth, improving ROAS by 25–40% through granular audience segmentation.
Minimal tracking creates blind spots that cost money. When you only measure pageview and purchase, you cannot identify where friction occurs. Is the problem product page engagement? Cart abandonment? Checkout completion? Enhanced funnel tracking reveals exactly where potential customers drop off, enabling targeted optimization. A 5% improvement in cart-to-purchase conversion on 10,000 EUR monthly revenue equals 500 EUR monthly gain. Complete funnel visibility enables these optimizations by making problems measurable.
18+ GA4 recommended events implemented via native platform APIs and instrumentation. view_item_list fires on Shopify section render via IntersectionObserver. select_item captures mousedown on product cards with item_list_id and item_list_name context. view_item triggers on product page load with full item array. add_to_cart via Shopify theme:cart:change PubSub event (native Shopify event bus). begin_checkout on checkout button click. purchase via Shopify Web Pixel API (customer events pixel, replaces deprecated checkout.liquid). Additional events: remove_from_cart, view_cart, search (Shopify search API integration), engagement score push. Full ecommerce object structure with item_id, item_name, price, quantity, item_category hierarchy.
Engagement Score: Know Who Wants to Buy
97–98% of visitors do not purchase. Engagement scoring (0–100) quantifies the difference between high-intent browsers and casual bounces.
Engagement-based retargeting can improve ROAS by 40% by eliminating budget waste on low-intent visitors. Standard retargeting treats all non-buyers equally: someone who spent 4 minutes viewing product images gets the same bid as a 3-second bounce. Engagement scoring creates actionable audience segments: Hot Leads (score > 60, high product image interaction, long active time), Warm Prospects (30–60), Casual Browsers (< 20). In Google Ads, you set bid adjustments: +50% for Hot Leads, baseline for Warm, -30% or exclude Casual. This channels retargeting budget toward users with demonstrated purchase intent, measurably lifting campaign ROAS within the first optimization cycle.
97% of visitors leave without purchasing, but they are not equally worthless. Without engagement measurement, retargeting campaigns spend equal budget on genuinely interested prospects and accidental clicks. Someone who explored multiple product images and spent 4 minutes reading specifications has far higher purchase probability than a 3-second bounce, but both appear identical in standard analytics. Engagement scoring makes this distinction measurable, enabling budget allocation based on demonstrated interest level rather than binary "visited/did not visit." This prevents systematic waste of retargeting budget on low-value traffic.
Composite engagement score from weighted instrumentation with idle callback debouncing. IntersectionObserver tracks scroll depth (no scroll event listener—better performance). visibilitychange API for true active time (pauses when tab loses focus). Swiper slideChange events capture product image interaction with Set-based deduplication for unique slides viewed. Accordion/tab interaction via click event delegation. Score calculation: weighted sum normalized to 0–100 scale. DataLayer push via requestIdleCallback with 5-second debounce to batch updates. Zero main-thread blocking. Score sent as GA4 custom dimension (dimension_8), enables audience building and bid adjustments.
Visitor Identity: Recognise Every Customer
Browser restrictions delete client-side cookies after 7 days. Multi-session customer journeys break, attribution fails, conversions appear organic.
Safari cookie deletion breaks attribution for purchase cycles longer than 7 days. User clicks your Google Ads on Monday, browses product reviews on mobile Wednesday, purchases on desktop the following Tuesday. Standard client-side tracking sees three unrelated sessions—the conversion shows as "direct/none" instead of Google Ads. Your campaign performance reports systematically understate paid channel effectiveness while overstating organic traffic. Triple identity linking (server-side UUID + GA Client-ID backup + platform click ID persistence) maintains attribution across the full customer journey. Your Google Ads reports finally reflect actual paid conversion contribution, enabling accurate ROAS calculation and budget decisions.
Attribution failure leads to systematic budget misallocation. 35–45% of DACH mobile users use Safari with 7-day cookie limits. With typical B2C purchase cycles of 10–14 days, a significant portion of conversions are misattributed to "direct" or "organic" instead of the paid campaigns that initiated them. This creates false data showing paid advertising underperforms while organic mysteriously succeeds. Budget shifts away from profitable paid channels based on systematically broken attribution. Fixing visitor identity means decisions based on actual customer journeys rather than technical artifacts of browser restrictions.
Triple identity strategy with server-side cookie persistence and deterministic cross-device linking. Primary: custom UUID in server-set first-party cookie (_earnst_vid) with 13-month Max-Age and SameSite=Lax, created via GTM Server Container Set-Cookie header. Secondary: GA Client-ID (_ga cookie) backup stored in server-side cookie. Tertiary: Shopify _shopify_y visitor ID. Click ID persistence: gclid, fbclid, gbraid, wbraid extracted from URL parameters and persisted in dedicated cookie with 90-day lifetime. On authenticated session, customer_id links to UUID for deterministic cross-device identity. Identity resolution logic runs in GTM Server Container with fallback hierarchy and event enrichment.
Phone Tracking and Call Attribution
Many businesses convert 30% to 50% of customers via phone calls. Without attribution, this conversion volume is invisible to campaign optimization.
Phone conversions missing from your data means Smart Bidding optimizes on half the picture. If 40% of your actual conversions happen via phone but only online purchases feed into Google Ads, your bidding algorithm systematically undervalues campaigns that drive phone calls. Keywords that generate high call volume appear to underperform because conversions aren't tracked. Phone tracking with offline conversion import attributes calls to specific campaigns, keywords, and ads. Google Ads Smart Bidding sees complete conversion volume, Meta campaigns receive phone conversion events via Conversion API, and your ROAS calculations finally reflect total business value generated.
Invisible conversions create false performance signals that misdirect budget. When 30–50% of revenue comes from phone calls but tracking only captures online purchases, your campaign reports systematically understate total ROI. Channels that drive calls appear unprofitable while pure e-commerce channels look artificially successful. Budget shifts toward incomplete metrics. Phone attribution makes the full revenue picture visible, preventing strategic errors based on partial data. With 10,000 EUR monthly ad spend and 40% phone conversion share, you're currently making budget decisions based on 6,000 EUR of visible conversions while 4,000 EUR remain untracked.
Dynamic number insertion with webhook-based offline conversion import. Call tracking system (e.g., CallRail, Infinity) serves unique phone numbers based on utm_source, utm_campaign, gclid parameters stored in session. On inbound call, webhook POST to custom endpoint matches phone session data to stored click IDs. Offline conversion payload constructed with gclid, conversion_name, conversion_time, conversion_value. Google Ads Offline Conversion Import API receives authenticated request. Meta Conversion API receives parallel CAPI event with call metadata. Server-side event stitching links phone conversions to original click attribution chain.
Who Needs This?
Any business where advertising decisions depend on conversion data, or where analytics gaps create strategic blind spots.
You need this if campaign performance reports don't match revenue reality. Your Google Ads dashboard shows declining conversion rates, but revenue is stable or growing. Retargeting audiences are shrinking despite consistent traffic. Smart Bidding recommendations seem disconnected from actual business results. These are symptoms of tracking data loss—browser restrictions, ad blockers, and consent mode gaps create systematic measurement failure. Enhanced tracking fixes the data foundation your campaigns depend on, restoring the connection between reported metrics and actual business outcomes.
You need this if advertising investment decisions feel like guesswork. When 30–40% of conversion data is missing, budget allocation cannot be evidence-based. Channels appear to underperform due to tracking gaps rather than actual inefficiency. Phone conversions remain unattributed. Compliance requirements create legal exposure. The cost is not just lost data—it's strategic misdirection of your entire marketing budget combined with GDPR liability risk. Particularly critical for businesses with 10,000+ EUR monthly ad spend, phone conversion channels, or multi-week purchase cycles where browser restrictions break attribution.
You need this if current tracking implementation has technical debt or platform limitations. Client-side-only tracking with no server-side component. JavaScript cookie writes instead of HTTP header cookies. No Consent Mode v2 implementation. Tag-in-tag loading patterns creating race conditions. Third-party CMP dependencies with iframe-based consent collection. Shopify checkout.liquid tracking (deprecated August 2026). No engagement scoring or identity resolution. These are architectural limitations that cannot be fixed with configuration changes—they require ground-up reimplementation with proper infrastructure and API integration patterns.
How EARNST Approaches It
We begin with a tracking audit to identify current coverage, gaps, and lost conversions. Implementation follows a documented architecture pattern.
You get complete transparency into what changes and how it affects your campaigns. The audit phase reveals exactly which conversion events currently fire, which tracking gaps exist, and what percentage of conversions are being lost. Before go-live, you see side-by-side data comparison: old tracking vs. new implementation running in parallel. GA4 receives 15 pre-configured custom dimensions and 12 retargeting audiences ready for immediate campaign use. After go-live, you have documented event definitions showing which user actions trigger which GA4 events and how they feed into Google Ads and Meta campaigns. No black box—complete visibility into how your campaign data is collected.
You receive fixed-price quote, defined timeline, and documented deliverables. After discovery call, you get itemized scope: server infrastructure setup cost (2,500–8,000 EUR one-time), monthly hosting cost (30–80 EUR), implementation timeline (2–6 weeks), and ongoing support options (from 1,000 EUR/month). No hourly billing uncertainty. Full documentation ensures knowledge transfer—no vendor lock-in. GDPR compliance documentation included for audit purposes. After go-live, two-week parallel monitoring period proves data accuracy before old tracking is retired. Investment protected through transparent process and complete documentation.
You get complete architecture documentation and infrastructure access. GTM Server Container deployed on dedicated infrastructure with nginx reverse proxy on tracking.yourdomain.com subdomain. HTTP response header cookie configuration via Set-Cookie headers. API integration setup includes Meta CAPI, Google Ads Enhanced Conversions API, TikTok Events API with event_id-based deduplication logic. Enhanced e-commerce implementation via Shopify theme files: consent defaults, event tracking instrumentation, engagement scoring with IntersectionObserver, Web Pixel for checkout events. GA4 configuration: 15 custom dimensions, 12 audiences, automated import. Full documentation: event matrix, data flow diagrams, API authentication setup, DNS configuration requirements. After implementation, you have complete infrastructure access and can modify any component.
Project Scope
Standard implementations take 2 to 3 weeks, complex multi-domain setups with phone tracking take 4 to 6 weeks.
Your campaigns continue running without interruption during migration. Old and new tracking run in parallel for two weeks—no data gap, no lost conversions. You see comparison reports proving the new implementation captures more conversions before we retire old tracking. GA4 audiences and custom dimensions are pre-configured, so you can start building retargeting campaigns immediately after go-live. Enhanced conversion events begin feeding Google Ads Smart Bidding within the first optimization cycle. Timeline: Week 1 audit and setup, Week 2 implementation and testing, Week 3 parallel monitoring and optimization.
You receive fixed timeline commitment with milestone-based delivery. Standard setup: 2–3 weeks from kickoff to go-live. Complex setups (multi-domain tracking, phone attribution, custom consent platform): 4–6 weeks. Each milestone delivers documented progress: audit findings, architecture plan, implementation completion, parallel monitoring results. No open-ended consulting engagement—fixed scope with defined endpoints. Required from your side: DNS access for subdomain configuration, administrative access to analytics and advertising accounts, coordination availability for go-live timing. Infrastructure hosting cost begins only after go-live approval.
Implementation requires specific access levels and technical prerequisites. DNS access: ability to create subdomain A record pointing to dedicated infrastructure IP. GTM access: container admin permissions for Web Container and Server Container setup. Platform access: GA4 admin, Google Ads conversion tracking permissions, Meta Events Manager admin, relevant ad platform API credentials. Shopify setup: theme code access for file deployment (5 liquid files + web pixel), checkout extensibility for post-purchase tracking. Infrastructure: dedicated server provisioning (provided by EARNST), nginx configuration, SSL certificate setup. Optional: database access for offline conversion matching, phone tracking system webhook configuration, CRM API access for event enrichment.
Data Loss in Standard Tracking
Client-Side vs. Server-Side Tracking
Client-Side (Standard)
40–70% data loss
Server-Side (EARNST)
0–5% data loss
Cookie Lifetime by Browser
Campaign Tracking Uplift
Typical Results
40%
Less data loss through server-side tracking + Consent Mode v2
18+
Events in the funnel instead of the usual 3–5
€0
Monthly costs for tracking apps and cookie banners
What you get
GTM Server Container on Own Infrastructure
No Stape, no Google Cloud shared hosting. Full control over server, network, and data flows on dedicated infrastructure.
True First-Party Cookie Modification
HTTP response header-based cookie configuration. 13-month lifetime instead of 7-day JavaScript cookies. Safari ITP-resistant.
API-Based Conversion Attribution
Server-side data delivery to Google, Meta, and other platforms. Independent of browser restrictions and ad blockers.
Enhanced E-Commerce (18+ Events)
Complete funnel tracking from discovery to purchase. 3–5x more data points for Smart Bidding than standard setups.
Engagement Score (0–100)
Weighted composite score from scroll depth, active time, product image interaction. Usable as bidding signal and retargeting criterion.
Visitor Identity (13-Month Cookie)
Triple identity linking: custom UUID, GA Client-ID backup, Shopify Visitor ID. Cross-session and cross-device tracking.
Custom CMP or CMP Integration
Custom cookie banner with Consent Mode v2 or integration of existing CMPs. Saves 50–300 EUR/month compared to CMP subscriptions.
GA4 Automation + Documentation
15 custom dimensions, 12 retargeting audiences, and key events automatically configured. Full documentation for GDPR audits.
“Ein Freak in Sachen Vermarktung, Performance, digitaler Vertrieb - seine Leidenschaft ist bei jedem Gespräch spürbar.”
Nina Kraft
Moderatorin für Events, TV, Radio & Online, NK-MfETR&O
Frequently Asked Questions
How much does the setup cost?
A standard setup starts at 2,500 EUR, more complex multi-domain setups up to 8,000 EUR. Hosting: 30 to 80 EUR/month. Ongoing support (campaign optimization, tracking maintenance, consulting) from 1,000 EUR/month. You receive a fixed-price quote after the discovery call.
How long does the migration take?
Standard setup takes 2 to 3 weeks, more complex multi-domain setups 4 to 6 weeks. Your existing tracking runs in parallel during migration, so there is no data gap.
What is the difference to a tracking app?
Tracking apps cost 50 to 300 EUR per month, frequently produce duplicate purchase events, convert prices incorrectly, and provide no engagement data. Our setup consists of custom files on your infrastructure: 0 EUR monthly software costs, no vendor lock-in, full control. Over 3 years, you save 1,800 to 10,800 EUR, with a technically superior setup.
Does it work on Shopify?
Yes, with any Shopify plan: no Shopify Plus required. The setup consists of 5 theme files (CMP, consent defaults, event tracking, consent debugging) plus a web pixel for checkout tracking and GTM API tooling. We have published a detailed knowledge article with the complete architecture.
Why not Stape or Google Cloud?
Stape and Google Cloud are shared hosting solutions. You share resources with other customers and are locked into whatever features the provider exposes. On your own infrastructure, you control the entire stack: modify cookie attributes at the OS level, install custom modules, adjust data flows. No vendor lock-in, no price increases.
What is API-based conversion attribution?
Instead of relying on browser pixels, we send conversion data directly via API to Google, Meta, and other platforms. Server-side, completely independent of the browser. No ad blocker, no ITP can interfere with this attribution.
Does it work with my consent management platform?
Yes. We integrate existing CMPs or develop a custom consent management solution: custom design, custom logic, full control over consent signals. Consent Mode v2 is natively supported. A custom cookie banner saves 50 to 300 EUR per month compared to CMP subscriptions.
Will I lose historical data during migration?
No. We migrate gradually and run old and new tracking in parallel for two weeks. This allows us to compare data and ensure nothing is lost.
Can phone calls be tracked?
Yes. Phone tracking with call attribution maps calls to specific campaigns, keywords, and ads. Call data flows into the same attribution as online conversions.
Is there a guide or PDF available?
Yes. We have published a detailed knowledge article and a 10-page PDF with the complete architecture. Both free, no form required.
You might also be interested in
Ready to discuss?
Tell us about your project. We will get back to you within 24 hours.