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

Install a proxy package

Terminal
2

Add the proxy routes

server.js
Mount these routes before a catch-all route that would otherwise consume them.
3

Update your tracker

index.html
4

Verify installation

Deploy the server and confirm the browser requests your own /script.js and /api/events paths. Check Trfyx for the resulting activity.
Preserve the visitor’s original IP through your reverse proxy. If all locations are identical, check X-Forwarded-For handling or switch to Managed Proxy.

Next steps

Goals

Funnels

Managed Proxy

Troubleshooting

Last modified on October 12, 2026