Skip to main content

Add Trfyx to your Replit project

Use Replit Agent to install Trfyx in the shared application shell, then verify the integration on the deployed site. The script URL should be included explicitly in the generated code: https://app.trfyx.com/script.js.

1. Prepare the tracking snippet

Use your Trfyx Website ID and the domain you want to measure:
Replace YOUR_TRFYX_PROJECT_ID with your Trfyx Website ID and yourdomain.com with the domain you want to track. Keep the script URL exactly as shown.

2. Ask Replit Agent to add tracking

Open Replit Agent and use a prompt similar to this:
The right file depends on the framework Replit generated. The important part is that the tracker is added to the shared application shell, not repeatedly to individual pages or components.

3. Run, deploy, and verify

  1. Use Replit’s Run action to check for errors.
  2. Deploy the application through your normal Replit deployment flow.
  3. Open the public URL and visit several pages or routes.
  4. Open browser Developer Tools and confirm the Trfyx script and tracking requests load.
  5. Check app.trfyx.com for incoming activity.

Troubleshooting

If tracking is missing, confirm the generated HTML contains the correct Trfyx script URL, Website ID, and domain. Check the Network tab for blocked requests, review CSP and consent settings, and search for duplicate installations. Re-check the shared layout if you regenerate or restructure the application.
Last modified on October 11, 2026