Skip to main content

Add Trfyx to your Lovable website

Ask Lovable to add the Trfyx tracker to your app’s shared layout or document head. The tracker must load once across the site, not separately inside each page.

1. Get the Trfyx tracking values

Use your Trfyx Website ID and the domain you want to measure. The tracking script URL is: https://app.trfyx.com/script.js This is the reference snippet Lovable should implement, adapted to your project’s framework:
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 Lovable to install Trfyx

Paste this prompt into your Lovable project:
Review Lovable’s changes before publishing. If the app uses React or Next.js, prefer its shared root layout or framework script component rather than adding a raw script to a single page.

3. Publish and verify

  1. Publish the site.
  2. Open the public URL in a normal browser tab.
  3. Visit the homepage and several additional routes.
  4. Open app.trfyx.com and check that activity appears in the correct Trfyx project.

Troubleshooting

If only one page is tracked, move the tracker to the global layout. If no data appears, verify the Website ID and domain, inspect the browser’s Console and Network tabs, and check whether CSP, consent settings, or browser extensions block the script. Remove any duplicate installation.
Last modified on October 11, 2026