linkprofit-cpa / yii2-referral-filter
Referral filter
v1.0.0
2018-01-15 16:58 UTC
Requires
- php: >=5.5.0
- yiisoft/yii2: >=2.0.5
This package is not auto-updated.
Last update: 2024-10-30 04:15:58 UTC
README
Installation
composer require linkprofit-cpa/yii2-referral-filter
Usage
Add code above to the controller behaviors section:
/** * @inheritdoc */ public function behaviors() { /* 1 day in seconds, until browser closed by default */ $expire = 60 * 60 * 24; return [ [ 'class' => 'linkprofit\ReferralFilter\ReferralFilter', 'sessionMarkers' => [ 'data1', 'data2', 'data3', 'data4', 'data5', 'chan' ], 'cookiesMarkers' => [ 'refid', 'cfads', 'CampaignID' ], 'cookiesExpire' => $expire ], ];
Session markers are written to $_SESSION['markers']['markerName']
, cookies markers are written directly to $_COOKIE['markerName']
;