Add Trfyx to your Laravel project
The recommended approach is to add the tracker to the shared Blade layout so it loads on every page.Add the tracker to your layout
Open your main layout, commonlyresources/views/layouts/app.blade.php, and add the tracker inside <head>:
Optional: use environment configuration
If staging and production use different Trfyx projects, you can keep each environment’s public tracking values in.env and expose them through Laravel configuration.
Add the values to your environment file:
config/trfyx.php:
.env values that are exposed to the browser.
Verify installation
- Deploy the Laravel application.
- Open the production URL.
- Navigate through multiple pages.
- Check the Trfyx dashboard for the incoming visit.