PHPackages                             nyx-solutions/yii2-nyx-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. [Framework](/categories/framework)
4. /
5. nyx-solutions/yii2-nyx-referer-parser

ActiveLibrary[Framework](/categories/framework)

nyx-solutions/yii2-nyx-referer-parser
=====================================

Yii2 Referer Parser

5.0.1(3y ago)186BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.2

Since May 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nyx-solutions/yii2-nyx-referer-parser)[ Packagist](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[ RSS](/packages/nyx-solutions-yii2-nyx-referer-parser/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (7)Dependencies (5)Versions (11)Used By (0)

Yii PHP Framework Version 2 / NYX Referer Parser
================================================

[](#yii-php-framework-version-2--nyx-referer-parser)

NYX Referer Parser is a PHP library for extracting marketing attribution data (such as search terms) from referer URLs.

[![Latest Stable Version](https://camo.githubusercontent.com/7be9acc113631f63c374df6b156b06ef9b7f2342c32e6fd853819f37498ce967/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f762f737461626c65)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![Total Downloads](https://camo.githubusercontent.com/783018627da345242ffc17ff2e906eda28e7e4f73183806f883d5479f5c2a6ff/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f646f776e6c6f616473)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![Latest Unstable Version](https://camo.githubusercontent.com/8ce572244a5382c3ac8ffb5c6c30288ba408516cd1bb43a0ad1622fa04efb415/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f762f756e737461626c65)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![License](https://camo.githubusercontent.com/7a96c0a2f861f8d4fc9452de50f494afe2d93d70528e65a68ed34c20771aa1ac/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f6c6963656e7365)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![Monthly Downloads](https://camo.githubusercontent.com/7bdfc9be3a8c913dffe77a87da996f5aa6b2bc96581870b4b1741980446cbce9/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f642f6d6f6e74686c79)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![Daily Downloads](https://camo.githubusercontent.com/ef7049fd05ac3f41e2a323bde4a2652122fb9c588235a7cba9725f0ecb59bfc2/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f642f6461696c79)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)[![composer.lock](https://camo.githubusercontent.com/01714aae7428cd5bbfb5f8a8e6eed78fdf8c9222caa33f99c5099ea05acef032/68747470733a2f2f706f7365722e707567782e6f72672f6e79782d736f6c7574696f6e732f796969322d6e79782d726566657265722d7061727365722f636f6d706f7365726c6f636b)](https://packagist.org/packages/nyx-solutions/yii2-nyx-referer-parser)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

- Either run

```
php composer.phar require --prefer-dist "nyx-solutions/yii2-nyx-referer-parser" "*"
```

or add

```
"nyx-solutions/yii2-nyx-referer-parser": "*"
```

to the `require` section of your application's `composer.json` file.

Usage
-----

[](#usage)

In components (in the following example we get the RefererParser data and pass to the `PublicAccessLog` model, which in this case is just an example):

```
namespace common\components\http;

use common\models\PublicAccessLog;

/**
 * Class RefererParser
 *
 * @package common\components\http
 */
class RefererParser extends \nyx\components\http\referer\RefererParser
{
    #region Constants
    const TYPE_GOOGLE_ORGANIC  = PublicAccessLog::TYPE_GOOGLE_ORGANIC;
    const TYPE_GOOGLE_ADS      = PublicAccessLog::TYPE_GOOGLE_ADS;
    const TYPE_GOOGLE_CAMPAIGN = PublicAccessLog::TYPE_GOOGLE_CAMPAIGN;
    const TYPE_EXTERNAL_SEARCH = PublicAccessLog::TYPE_EXTERNAL_SEARCH;
    const TYPE_EXTERNAL_SITE   = PublicAccessLog::TYPE_EXTERNAL_SITE;
    const TYPE_DIRECT          = PublicAccessLog::TYPE_DIRECT;
    #endregion
}
```

In the Controller Action:

```
$refererParser = new RefererParser();

$this->publicAccessLog = new PublicAccessLog(['scenario' => PublicAccessLog::SCENARIO_INSERT]);

$this->publicAccessLog->type        = $refererParser->getType();
$this->publicAccessLog->description = $refererParser->getDescription();
$this->publicAccessLog->source      = $refererParser->getSource();
$this->publicAccessLog->medium      = $refererParser->getMedium();
$this->publicAccessLog->term        = $refererParser->getTerm();
$this->publicAccessLog->content     = $refererParser->getContent();
$this->publicAccessLog->campaign    = $refererParser->getCampaign();
$this->publicAccessLog->device      = $refererParser->getDevice();

$this->publicAccessLog->save(false);
```

License
-------

[](#license)

**yii2-nyx-referer-parser** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

[![Yii2](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87.5% 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 ~244 days

Recently: every ~511 days

Total

10

Last Release

1440d ago

Major Versions

1.0.6 → 2.0.02020-05-03

2.0.0 → 4.0.02022-06-01

4.0.0 → 5.0.12022-06-02

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=7.4.0

5.0.1PHP &gt;=8.1.0 &lt;8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7c641a4199171cc30bf08b9bf67636a8463acf86813fa259aab131b5bd5a161?d=identicon)[nyx-solutions](/maintainers/nyx-solutions)

---

Top Contributors

[![jsas4coding](https://avatars.githubusercontent.com/u/4156892?v=4)](https://github.com/jsas4coding "jsas4coding (14 commits)")[![brenoherculano](https://avatars.githubusercontent.com/u/90738807?v=4)](https://github.com/brenoherculano "brenoherculano (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

phpframeworkyii2extension

### Embed Badge

![Health badge](/badges/nyx-solutions-yii2-nyx-referer-parser/health.svg)

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

PHPackages © 2026

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