
laravel-referer
This Laravel package remembers a visitor's original referrer in session data, prioritizing UTM source and referring domain.

About laravel-referer
laravel-referer is a Laravel package that stores a visitor's original referer in session data. It checks the utm_source query parameter first, then the domain from the request's Referer header when the host is external, otherwise it stores an empty value. It works by adding the CaptureReferer middleware to the web stack after StartSession. The stored value can be retrieved, manually set, or cleared, and the session key and detection sources can be changed in configuration.
Key features
- Stores original referer in session via CaptureReferer middleware
- Prioritizes utm_source query parameter for referer detection
- Falls back to external domain from Referer request header
- Retrieves stored referer through container or automatic facades
- Provides put and forget methods to set or clear referer
- Supports custom sources implementing the Source interface
- Empty values do not overwrite an existing stored referer
- Internal hosts are ignored so site navigation does not change referer
- Session key and detection sources can be configured
- Requires adding CaptureReferer middleware after StartSession
- Default detection is limited to utm_source and external Referer header
- Config file must be published to change session key or sources
laravel-referer at a glance
- Category
- Marketing & SEO › SEO & Web Analytics
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 5, 2026 · Online when checked
- Listed
- Oct 5, 2026
Guides for SEO & Web Analytics

laravel-referer alternatives
Tools and sites you could use instead, ranked by how closely they match.
The Laravel sitemap package generates sitemaps by discovering URLs automatically instead of requiring manual URL entry.
LaravelMetaTags provides tools for managing SEO metadata tags in Laravel projects.
This Laravel package redirects missing pages when URLs change during a website migration.
Add SEO features to Laravel applications with this developer library, which provides a set of tools for search optimization.
Aimeos provides an e-commerce framework for Laravel shops, marketplaces, and business-to-business applications.
Rybbit is open-source, cookieless web and product analytics with automatic interaction capture, session views, and reporting tools.
Popular in SEO & Web Analytics
Well-known listings from the same topic.
laravel-referer FAQ
How does the package determine the referer?
How do I start capturing the referer?
How can I retrieve, set, or clear the stored referer?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.












