PHPackages                             snowplow/referer-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. snowplow/referer-parser

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

snowplow/referer-parser
=======================

Snowplow Refer(r)er parser for PHP

0.2.0(10y ago)3782.2M—3.6%151[32 issues](https://github.com/snowplow/referer-parser/issues)20MITCI passing

Since Feb 1Pushed 5mo ago33 watchersCompare

[ Source](https://github.com/snowplow/referer-parser)[ Packagist](https://packagist.org/packages/snowplow/referer-parser)[ RSS](/packages/snowplow-referer-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (2)Used By (20)

referer-parser
==============

[](#referer-parser)

referer-parser is a database for extracting marketing attribution data (such as search terms) from referer URLs, inspired by the [ua-parser](https://github.com/tobie/ua-parser) project (an equivalent library for user agent parsing).

The referer-parser project also contains multiple libraries for working with the referer-parser database in different languages.

referer-parser is a core component of [Snowplow](https://github.com/snowplow/snowplow), the open-source web-scale analytics platform powered by Hadoop and Redshift.

*Note that we always use the original HTTP misspelling of 'referer' (and thus 'referal') in this project - never 'referrer'.*

Database
--------

[](#database)

The database is available in YAML and JSON format.

The latest database is always available on this URL:

The database is updated every day. Each new version of the database is also uploaded with a timestamp:

Example:

Language-specific repositories
------------------------------

[](#language-specific-repositories)

- Scala:
- Java:
- Ruby:
- Python:
- NodeJS:
- .NET:
- PHP:
- Golang:
- Erlang:

referers.yml
------------

[](#referersyml)

referer-parser identifies whether a URL is a known referer or not by checking it against the [`referers.yml`](https://github.com/snowplow/referer-parser/blob/master/resources/referers.yml) file; the intention is that this YAML file is reusable as-is by every language-specific implementation of referer-parser.

The file is broken out into sections for the different mediums that we support:

- `unknown` for when we know the source, but not the medium
- `email` for webmail providers
- `social` for social media services
- `search` for search engines

Then within each section, we list each known provider (aka `source`) by name, and then which domains each provider uses. For search engines, we also list the parameters used in the search engine URL to identify the search `term`. For example:

```
Google: # Name of search engine referer
  parameters:
    - 'q' # First parameter used by Google
    - 'p' # Alternative parameter used by Google
  domains:
    - google.co.uk  # One domain used by Google
    - google.com    # Another domain used by Google
    - ...
```

The number of referers and the domains they use is constantly growing - we need to keep `referers.yml` up-to-date, and hope that the community will help!

Contributing
------------

[](#contributing)

We welcome contributions to referer-parser:

1. **New search engines and other referers** - if you notice a search engine, social network or other site missing from `referers.yml`, please fork the repo, add the missing entry and submit a pull request
2. **Bug fixes, feature requests etc** - much appreciated!

**Please sign the [Snowplow CLA](https://github.com/snowplow/snowplow/wiki/CLA) before making pull requests.**

Support
-------

[](#support)

General support for `referer-parser` is handled by Snowplow Analytics team on [discourse](https://discourse.snowplow.io).

Copyright and license
---------------------

[](#copyright-and-license)

`referers.yml` is based on [Piwik's](http://piwik.org) [`SearchEngines.php`](https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php) and [`Socials.php`](https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php), copyright 2012 Matthieu Aubry and available under the [GNU General Public License v3](http://www.gnu.org/licenses/gpl-3.0.html).

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance46

Moderate activity, may be stable

Popularity64

Solid adoption and visibility

Community45

Growing community involvement

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~361 days

Total

2

Last Release

3762d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79707?v=4)[Lars Strojny](/maintainers/lstrojny)[@lstrojny](https://github.com/lstrojny)

---

Top Contributors

[![alexanderdean](https://avatars.githubusercontent.com/u/200511?v=4)](https://github.com/alexanderdean "alexanderdean (284 commits)")[![fblundun](https://avatars.githubusercontent.com/u/5892914?v=4)](https://github.com/fblundun "fblundun (42 commits)")[![donspaulding](https://avatars.githubusercontent.com/u/7777?v=4)](https://github.com/donspaulding "donspaulding (28 commits)")[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (20 commits)")[![tsileo](https://avatars.githubusercontent.com/u/395031?v=4)](https://github.com/tsileo "tsileo (15 commits)")[![swijnands](https://avatars.githubusercontent.com/u/1218969?v=4)](https://github.com/swijnands "swijnands (11 commits)")[![mkatrenik](https://avatars.githubusercontent.com/u/887117?v=4)](https://github.com/mkatrenik "mkatrenik (11 commits)")[![BenFradet](https://avatars.githubusercontent.com/u/1737211?v=4)](https://github.com/BenFradet "BenFradet (10 commits)")[![AlexBenny](https://avatars.githubusercontent.com/u/7823329?v=4)](https://github.com/AlexBenny "AlexBenny (5 commits)")[![235](https://avatars.githubusercontent.com/u/649444?v=4)](https://github.com/235 "235 (5 commits)")[![jhirbour](https://avatars.githubusercontent.com/u/2355?v=4)](https://github.com/jhirbour "jhirbour (4 commits)")[![kingo55](https://avatars.githubusercontent.com/u/2361388?v=4)](https://github.com/kingo55 "kingo55 (3 commits)")[![emilssolmanis](https://avatars.githubusercontent.com/u/663720?v=4)](https://github.com/emilssolmanis "emilssolmanis (3 commits)")[![jethron](https://avatars.githubusercontent.com/u/1646397?v=4)](https://github.com/jethron "jethron (3 commits)")[![oguzhanunlu](https://avatars.githubusercontent.com/u/4786472?v=4)](https://github.com/oguzhanunlu "oguzhanunlu (3 commits)")[![Tombar](https://avatars.githubusercontent.com/u/141697?v=4)](https://github.com/Tombar "Tombar (3 commits)")[![EyePulp](https://avatars.githubusercontent.com/u/231081?v=4)](https://github.com/EyePulp "EyePulp (2 commits)")[![mleuthold](https://avatars.githubusercontent.com/u/24938292?v=4)](https://github.com/mleuthold "mleuthold (2 commits)")[![shuttie](https://avatars.githubusercontent.com/u/999061?v=4)](https://github.com/shuttie "shuttie (2 commits)")[![danm](https://avatars.githubusercontent.com/u/6394846?v=4)](https://github.com/danm "danm (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/snowplow-referer-parser/health.svg)

```
[![Health](https://phpackages.com/badges/snowplow-referer-parser/health.svg)](https://phpackages.com/packages/snowplow-referer-parser)
```

###  Alternatives

[downshiftorg/wp-event-emitter

An object oriented event emitter for WordPress actions

1811.3k2](/packages/downshiftorg-wp-event-emitter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
