Meritt Get started

All platforms

Affiliate tracking on your CDN or edge platform

When a CDN or edge platform already sits in front of your site, that is where the rule goes: one path, relayed to us, without touching the origin server. Two points matter here: caching, and what the platform can strip from the request.

Cloudflare Workers

Where: worker script

A Worker of a few lines: every request under your prefix is relayed to our host without following the redirect; everything else passes through. Add a route /your-prefix/* on your domain.

Fastly

Where: VCL service configuration

A few lines in vcl_recv: Cookie and Authorization unset, the request sent to an origin declared on our host (TLS, SNI), and return(pass) so a redirect is never cached.

AWS CloudFront

Where: Origins + Behaviors (console or IaC)

Two settings in the console: an origin on our host, HTTPS only, then a behavior on /your-prefix/* with the CachingDisabled cache policy and the AllViewerExceptHostHeader origin request policy. Without it, CloudFront forwards no User-Agent and no Sec-Fetch headers, and every click looks like a script.

Vercel

Where: vercel.json

One rewrite in vercel.json, from your prefix to our host. Vercel cannot strip request headers.

Netlify

Where: netlify.toml

One [[redirects]] rule in netlify.toml, with status 200 and force = true: a relay, not a redirect. Netlify cannot strip request headers.

Common questions

Why turn caching off on this path?

A redirect served from a cache would send every visitor to the same affiliate. The tracking path is never cached.

Vercel and Netlify do not strip cookies: does it matter?

Your visitors' cookies reach us with the request. We never read them, and we would rather write that down than stay quiet. A rule on your web server can strip them.

Do I need to redeploy?

Yes: the rule only applies once deployed. Then run the check in the app.

And then

Free until your first commission. No card asked for.