Skip to main content
Timeline: 30 minutes Common for: Webhook-based conversions, CRM events, delayed subscription confirmations

The challenge

Server-side conversions (webhooks, CRM updates, batch processing) lack browser context needed for attribution. You can’t connect these conversions to the original campaign. Result: Conversions show without campaign context. Meta CAPI and Google Ads can’t optimise. Marketing loses visibility into which campaigns drive real business outcomes.

How Fidero solves this

Fidero maintains a complete user profile, including attribution context. When you send a conversion event with a userId, it’s automatically enriched with the preserved context.

Implementation

1

Install the SDK (captures initial context)

<script>
  fidero.load()
  fidero.init("YOUR_PROJECT_ID")
  fidero.page() // Captures click IDs and attribution when users first visit
</script>
This captures click IDs and attribution context when users first visit.
2

Track user identity

// Browser-side when they sign up (creates the unified profile)
fidero.track({
  event: "signup_completed",
  userId: "user_abc123", // Links anonymous browsing to known identity
  traits: {
    email: "alex@example.com",
  },
})
3

Send offline conversions via API

// Server-side webhook handler (days/weeks later)
await fetch("https://api.datahappy.co/v1/track", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${FIDERO_API_KEY}`,
  },
  body: JSON.stringify({
    projectId: "YOUR_PROJECT_ID",
    userId: "user_abc123", // CRITICAL: Links to existing profile
    event: "subscription_started",
    properties: {
      transaction_id: "sub_xyz789", // CRITICAL: Deduplication
      value: 49.99,
      currency: "GBP",
      subscription_id: "sub_xyz789",
    },
    timestamp: new Date().toISOString(),
  }),
})

What gets enriched automatically

  • Original click IDs: gclid, fbclid, ttclid from initial ad click
  • First touch attribution: Campaign, source, medium from initial visit
  • Last touch attribution: Most recent session context
  • All user traits: From unified profile (email, plan, signup_source)
  • Complete timeline: Full user journey from first visit to conversion

What you’ll see

Within 24 hours: Server-side conversions flow to Meta CAPI, Google Ads Offline Conversions and GA4 Measurement Protocol with complete attribution context. Typical results: Works immediately for any user with an existing profile. No manual parameter passing required. Each ad platform receives conversions with the identifiers they need to attribute and optimise.
Scenario: User browses on mobile, signs up, subscription processes 3 days later via background job.
// Day 0: User visits from Meta ad (mobile browser)
// SDK captures fbclid=abc123 → persists in anonymous profile

// Day 0: User signs up
fidero.track({
  event: "signup_completed",
  userId: "user_abc123", // Merges anonymous profile with known user
  traits: { email: "alex@example.com" },
})

// Day 3: Background job processes subscription
await fetch("https://api.datahappy.co/v1/track", {
  body: JSON.stringify({
    userId: "user_abc123",
    event: "subscription_started",
    properties: { transaction_id: "sub_xyz789", value: 29.99 },
  }),
})
Fidero enriches the Day 3 conversion with Day 0 attribution context automatically. Meta CAPI receives conversion with original fbclid=abc123. Meta’s algorithm learns which mobile users actually subscribe 3 days later.
Batch processing: CRM syncs run nightly, enriching customer records with subscription status. Send events via API with userId – attribution context attached automatically.Payment confirmations: Stripe/Adyen webhooks fire when payment clears. Send conversion event – original click IDs flow to ad platforms automatically.Trial-to-paid conversions: Free trial converts to paid 14 days after signup. Send upgrade event – connects back to campaign that drove trial signup automatically.All scenarios follow same pattern: capture context early via the SDK → send conversion later via API with userId → enrichment happens automatically.

Next steps

Identity and attribution

How unified profiles persist attribution context

Browser state capture

What context gets captured automatically