Menu

1 / 3

Transparent Click Tracking: Custom Tracking Domains, Redirects and Postbacks

DEV Community: javascript·Muhammad Hassaan Anjum·6 days ago
#uExiyYXY
#devtojavascript#devto#dev#click#tracker
Long article (1004 words) — no AI summary yet.
Reading 0:00
15s threshold

A click tracker sits between the ad and the landing page. It records the click, gives it an id, and sends the visitor on. Done badly, it is a black box that ad networks distrust and that adds delay. Done well, it is transparent : it runs on your own domain, it says exactly where it sends people, and it adds nothing but its own id.

This is how I built the click tracker in EventsIQ .

Step 1: a tracking domain of your own

The ad link should point at a subdomain you own, like track.yoursite.com , not at the tracker company's domain. Visitors and ad networks see your name.

Setting one up is a single DNS record:

track.yoursite.com CNAME <the tracker's address>

Enter fullscreen mode

Exit fullscreen mode

Behind the scenes, EventsIQ uses Cloudflare for SaaS custom hostnames for this. When a customer adds their subdomain, the app registers it with Cloudflare, Cloudflare checks the CNAME and issues the HTTPS certificate, and the status moves from "Waiting for DNS" to "Issuing certificate" to "Live".…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.