Domain Proxy
This guide explains how to set up a proxy server using your own domain and use it with the Hackle SDK. This is useful for reducing the impact of ad blockers on user behavior tracking.

To configure and apply the proxy server, you need to complete the following two steps.
Configure the proxy server
Configure the SDK to point to the proxy server
1. Configure the Proxy Server
Configuration via Cloud
Most major cloud providers make it easy to develop and deploy proxy services.
The following is an example of setting up a proxy service using AWS CloudFront.
Go to AWS CloudFront Console
Click Create distribution
In the Origin section:
Origin domain: set to
event.hackle.ioProtocol: set to
HTTPS Only

In the Default cache behavior section:
Viewer protocol policy: set to
Redirect HTTP to HTTPSAllowed HTTP methods: set to
GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETECache key and origin requests: Allow all Headers and Parameters to be forwarded to the Origin, and allow CORS requests to the Origin.

In the Function associations section:
Origin request: Add a Lambda@Edge Function to change the
Hostheader toevent.hackle.io. Reference: Tutorial: Creating a simple Lambda@Edge function

Use the following code in the Lambda@Edge Function.
Click Create distribution at the bottom of the page.
Building a Proxy Server
You can also build your own proxy server.
Here is an example of building a proxy server using NGINX. The configuration below redirects all calls to the proxy server to Hackle.
2. SDK Configuration
You need to configure the SDK to point to the proxy server. You can set this using the eventUrl option during SDK initialization.
Last updated