Pirsch Docs>Get Started>Proxing the Scripts

Proxing the Scripts

04. Sep, 2022

Proxies are a more advanced setup and require you to install software on your server. We recommend starting with the backend or frontend integration.

What Is a Proxy and Why Should You Use It

A proxy is a self-hosted middleware that allows you to serve the Pirsch JavaScript snippets from your own domain.

The benefit of this is that your website will only make first-party requests. Requests to pirsch.io will be proxied through your server, preventing them from being blocked by ad or script blockers.

Additionally, you can create rollup views and send data to multiple dashboards with a single request to the proxy, instead of requiring the client to make multiple requests.

Here is an example for a JS snippet using your proxy. The integration for the event script is similar.

<script defer type="text/javascript"

As you can see, it loads the script from your own domain (/pirsch/pirsch.min.js). The page view will be sent to your own domain as well (on /pirsch/hit), and then forwarded to your Pirsch dashboard.

Available Proxies

We offer two proxy servers you can install on your server. Both are open-source and can be found on GitHub.

The PHP proxy can easily be installed on any PHP server by downloading the latest release and extracting it on your server.

The Go server is suitable for any VPS (virtual private server) and can be installed using Docker or by running the executable on your server directly (using systemd on Linux for example). No additional software is required, making it lightweight and easy to install.

For details and installation instructions, please check out the readme on GitHub.