Server-side tracking · Cloudflare

Server-side tracking on Cloudflare, without paying for a tagging host

If your site already runs on Cloudflare, your tracking can too. I build first-party server-side endpoints on Cloudflare that forward e-commerce and lead conversions to GA4, Google Ads and Meta, without a separate Stape or Taggrs server.

  • First-party endpoints on your domain
  • E-commerce conversions
  • Lead conversions
  • GA4, Google Ads & Meta CAPI

Why run tracking on Cloudflare

Server-side tracking normally needs a hosted tagging server. If your domain is already on Cloudflare, its edge network can receive events on your own domain and forward them to the ad platforms. Cloudflare is the infrastructure, not the whole solution: the events, data layer, consent logic and platform mappings still have to be designed and built.

  • Events are collected on your own domain, so browsers treat them as first-party.
  • No separate tagging server to rent or maintain.
  • Low latency, because requests are handled close to the visitor.
  • Full control over what data is forwarded to each platform.
Server-side tracking

Server-side tracking for Cloudflare

Events keep a shared event ID between browser and server, so Meta and other platforms can deduplicate them, and consent choices are respected before anything is forwarded.

First-party collection

Events go to your own domain first, which browsers treat as first-party.

Enrichment

Server events can add data the browser doesn't have, such as order status or customer ID.

Deduplication

Browser and server copies share an event ID, so each conversion is counted once.

E-commerce tracking

Cloudflare e-commerce tracking: every step with live values

Each event sends real values from your store to Cloudflare: product details, quantities, cart value, currency and order revenue.

  1. 01 page_view Page view page type, user state
  2. 02 view_item Product view item ID, name, price
  3. 03 add_to_cart Add to cart item, quantity, value
  4. 04 begin_checkout Checkout start cart items, value
  5. 05 add_shipping_info Shipping step shipping tier, value
  6. 06 add_payment_info Payment step payment type, value
  7. 07 purchase Purchase order ID, revenue, tax

Values are injected dynamically from the page and checkout, so totals match your real orders. Event names above follow GA4 conventions as a reference; the final names and required properties always follow each destination platform's own specification.

Lead tracking

Lead tracking for service businesses

Every way a prospect raises their hand is captured and sent to Cloudflare once, with the context you need to judge lead quality.

Lead signals captured

  • Lead form submit
  • Sign-up
  • Login
  • Site search

Form tools supported

  • Contact Form 7
  • Gravity Forms
  • Ninja Forms
  • HubSpot Forms
  • Calendly
  • AJAX & custom forms

Duplicate event suppression

One conversion per lead, even when visitors reload the page or several scripts listen to the same form.

Thank-you pop-up detection

Element visibility triggers catch success messages and pop-ups that appear without a page change.

iFrame & cross-domain continuity

Embedded forms and journeys across domains keep the same session and attribution.

Two ways to do it on Cloudflare

The right option depends on how much control you need.

Cloudflare Zaraz

Cloudflare's own tag manager loads and runs supported tools from the edge. Quick to set up for common platforms, with less custom logic.

Custom Cloudflare Workers

A small Worker on your domain receives events and forwards them to GA4 (Measurement Protocol), Meta Conversions API and other APIs, with your own enrichment and deduplication.

Deliverables

What you get

  • Architecture choice: Zaraz, custom Workers, or a mix
  • First-party collection endpoint on your domain
  • E-commerce conversions with dynamic values
  • Lead conversions from your forms
  • Forwarding to GA4, Google Ads and Meta CAPI with deduplication
  • Consent handling and a QA report
Process

How we work together

  1. 01
    Audit

    I review your current Cloudflare setup, tags, forms and data flows, and list what is missing or wrong.

  2. 02
    Plan

    You get a written tracking plan: events, values, identity and where each signal goes.

  3. 03
    Build

    I implement the plan on your site, server and integrations, without breaking existing tracking.

  4. 04
    Verify

    Every event is tested with real actions and compared with your store or CRM, then documented.

How I Work

My Proven 5-Step Working Process

A clear, tested process, so you know exactly what is being tracked, why, and that it works. Nothing goes live until it is tested against real conversions.

  1. Step 1: Free discovery call

    Free · 30 min

    We agree what counts as a real lead or sale for your business, which platforms you use and where the numbers stop adding up.

  2. Step 2: Tracking audit & measurement plan

    Step 1

    I audit your tags, GTM container, GA4, ad platform conversions and CRM, then write a tracking plan for you to approve before anything changes.

  3. Step 3: Build & connect

    Implementation

    GA4, Google Tag Manager, server-side tracking, Meta CAPI, enhanced conversions and CRM or offline imports are built and connected end to end.

  4. Step 4: Test & verify

    Before go-live

    Every event is checked in GTM Preview, GA4 DebugView and each ad platform's diagnostics, with deduplication and consent tested properly.

  5. Step 5: Handover & support

    Docs + video

    You get written documentation and a walkthrough video, and I stay on hand after launch to make sure the data keeps matching.

FAQ

Cloudflare questions

Is this cheaper than Stape?

For many sites, Cloudflare's usage-based pricing is low, and you avoid a separate tagging server. The real cost depends on your traffic and plan, so I estimate it before building.

Does it replace server-side GTM?

It can for straightforward setups. If you need many vendor templates and a visual interface, server-side GTM may still be the better fit. I'll recommend the simpler option for your case.

Do I need to move my website to Cloudflare?

Your domain needs to use Cloudflare. The website itself can stay on its current host.

Let's get your Cloudflare tracking right

Tell me what you're tracking today and where the numbers don't add up. You'll get an honest assessment and a clear plan.