Sign inSign up

partnerize/tracking-reverse-proxy

By partnerize

Updated 8 months ago

Partnerize reverse tracking proxy, supplied to brands.

Image
Integration & delivery
Web servers
0

806

partnerize/tracking-reverse-proxy repository overview

Partnerize Tracking Reverse Proxy

This Docker image provides an NGINX-based reverse proxy for Partnerize tracking, and is meant to be distributed to brands to deploy within their network.

It facilitates first-party tracking by proxying tracking traffic arriving in their network to the Partnerize service prf.hn.

Usage

A brand should configure a subdomain (i.e. tracking.molimo.com) or a path (i.e. molimo.com/tracking) to direct traffic to the tracking reverse proxy, and run it within their brand network to enable first-party tracking.

Brands are required to overwrite X-Forwarded-For on their user-facing server (i.e. a load balancer) to make sure that the IP address can not be spoofed by users, and instead set it to the user's IP.

Deployment

Using Docker for deployment, the following environment variables modify its behaviour:

VariableDefaultRequiredDescription
AUTH_TOKEN---yesAuthentication token provided by PZ
CLICK_ENDPOINT/clickyesPath of the click endpoint
SHORTLINK_ENDPOINT/lyesPath of the shortlink endpoint
CONVERSION_ENDPOINT/conversionyesPath of the conversion endpoint
CREATIVE_ENDPOINT/creativeyesPath of the creative endpoint
SOURCE_ENDPOINT/sourceyesPath of the source endpoint
COOKIE_NAMEtPHG-PSyesKey of the tracking cookie
HTTPS_CERT_LOCATION/etc/nginx/cert.pemnoLocation of the SSL certificate
HTTPS_KEY_LOCATION/etc/nginx/key.pemnoLocation of the SSL private key

The values for these variables will be provided to you when creating a Custom Tracking URL on the Partnerize platform.

For example, to start a container using all the defaults apart from the auth token, and the HTTP server exposed on port 8000, you would run:

docker run -p 8000:80 -e AUTH_TOKEN=abc123 partnerize/tracking-reverse-proxy

The image is based on the nginx Dockerhub image, see there for more infos about usage and extra features.

Custom Deployment

Brands that want to deploy a proxy without the image can see all the required customisations to the basic Nginx proxy in /etc/nginx/templates/server.conf.template, i.e. by running

docker run --entrypoint=cat partnerize/tracking-reverse-proxy /etc/nginx/templates/server.conf.template

You should be able to find similar settings for other webservers like Apache.

HTTPS

If you want to support HTTPS on the proxy (and not terminate HTTPS before), you need to add the certificate file and private key to the running container, for example as a volume.

Then, point HTTPS_CERT_LOCATION and HTTPS_KEY_LOCATION to the files you have added to the container.

By default, the container certificates are self-signed.

Tag summary

Content type

Image

Digest

sha256:32e9aef11

Size

5.5 MB

Last updated

8 months ago

docker pull partnerize/tracking-reverse-proxy