Skip to main content
Use FastAPI to forward the Trfyx script and event requests through your application.
1

Install dependencies

Terminal
2

Add proxy routes

main.py
3

Update your tracker

index.html
4

Verify installation

Deploy the API, load your site, and check that /script.js and /api/events resolve on your domain. Verify incoming activity in Trfyx.
If your application is behind another load balancer, configure trusted proxy handling there too. Incorrect forwarding can make every visitor appear to come from the same server.

Next steps

Goals

Funnels

Managed Proxy

Troubleshooting

Last modified on October 12, 2026