Meritt Get started

All platforms

Affiliate tracking on your own web server

On a server you run, mode A is one rule: the path of your tracking prefix is relayed to us, and the rest of your site does not move. The app gives you the rule filled in with your domain and prefix, then checks that it answers.

nginx

Where: nginx.conf → the server block for acme.com

One location block on your prefix, in the server block for your domain: it relays to edge.trymeritt.com with SNI on — without it the TLS handshake fails and every link returns 502 — strips Cookie and Authorization, and does not send the request body.

Apache

Where: httpd.conf or .htaccess

One <Location> block in httpd.conf or .htaccess, with ProxyPass and ProxyPassReverse to us, Cookie and Authorization unset, and SSLProxyEngine on. The proxy modules must be enabled, otherwise the rule is ignored.

Caddy

Where: Caddyfile

One handle block in the Caddyfile: reverse_proxy to us, with the upstream Host header and Cookie and Authorization removed. Caddy handles TLS to us on its own.

HAProxy

Where: haproxy.cfg

An ACL on the path prefix in your frontend that deletes Cookie and Authorization and sends the request to a dedicated backend: verified TLS, SNI to our host.

IIS

Where: web.config

One rewrite rule in web.config that sends your prefix to us and blanks the HTTP_COOKIE and HTTP_AUTHORIZATION server variables. The URL Rewrite module must be installed.

Common questions

Why does the rule strip Cookie and Authorization?

Your visitors carry your site's cookies and tokens. Stripping them before the relay makes sure they never reach us.

What is the prefix?

A segment of your own workspace, never a generic /r/. A rule relaying a path other than the one your links use would look right and track nothing.

How do I apply the rule?

Reload the server: nginx -s reload on nginx, apachectl graceful on Apache. Then run the check in the app.

And then

Free until your first commission. No card asked for.