Skip to main content
Use Flask to expose same-origin routes for the Trfyx script and event collection.
1

Install dependencies

Terminal
2

Add proxy routes

app.py
3

Update your tracker

index.html
4

Verify installation

Confirm the browser uses your /script.js and /api/events endpoints and that activity appears in Trfyx.
Do not trust an arbitrary client-supplied X-Forwarded-For header in a public deployment. Configure your trusted proxy/load-balancer chain correctly so the forwarded IP represents the real visitor.

Next steps

Goals

Funnels

Managed Proxy

Troubleshooting

Last modified on October 12, 2026