smaple.tr
Backend & APIs

Ad Attribution & UTM Tracking Platform

First-party tracking, multi-touch attribution and ad-platform integrations for a subscription attribution CRM built by a US paid-media agency.

Client
Paid-media agency (USA)
Industry
Marketing technology
Period
Jun 2026 – ongoing
Engagement
Product engineering
JavaScriptReactExpressPostgreSQLCloudflare WorkersOAuth

Key Results

Tracking script captures all 5 UTMs and 8 ad click IDs; attribution tested across 6 traffic sources; Google, Reddit and TikTok integrations live

Ad Attribution & UTM Tracking Platform

The Challenge

The agency had a half-built attribution CRM on Replit with no working tracking script, the piece that makes attribution possible at all. It had to capture every UTM and ad click ID, work in single-page apps, respect privacy, and tie conversions back to campaigns on every major ad platform.

Our Solution

We moved the app from Replit to GitHub and wrote the tracking script from scratch: single-page-app pageviews, first-party visitor and session IDs, client-side SHA-256 hashing of emails and phone numbers, sendBeacon delivery with batching and retries, first- and last-touch persistence, purchase de-duplication and a public track/identify API. It captures all five UTM parameters and eight click IDs (gclid, wbraid, gbraid, fbclid, ttclid, msclkid, li_fat_id, twclid). We redesigned attribution as channel → campaign → ad → events, added automatic conversions from CRM deals and contacts, and built OAuth integrations for Meta, Google Ads, LinkedIn, Reddit and TikTok.

The Outcome

Attribution has been tested across six traffic sources, and the platform now runs on Cloudflare Workers with the Google, Reddit and TikTok integrations live. Cross-domain tracking is in live testing, and consent mode for EU, US and global traffic is in progress.

Highlights

  • First-party tracking script written from scratch
  • 5 UTM parameters and 8 ad click IDs captured
  • Client-side hashing of personal data
  • Channel → campaign → ad → event attribution model
  • OAuth integrations with five ad platforms

Interested in Backend & APIs Services?

Learn more about our backend & apis capabilities and see how we can help with your project.

Explore Backend & APIs Services

Have a Project in Mind?

Let's discuss how we can bring your vision to life with a custom solution.

Start Your Project