orlserg/utm-recorder
Composer 安装命令:
composer require orlserg/utm-recorder
包简介
Package to track utm attributes from visitors
README 文档
README
UtmRecorder help you record utm parameters from visitors and visited urls.
Documentation
Installation
$ composer require orlserg/utm-recorder
Add the service provider and (optionally) alias to their relative arrays in config/app.php:
'providers' => [ ... \Orlserg\UtmRecorder\UtmRecorderServiceProvider::class, ], ... 'aliases' => [ ... 'UtmRecorder' => \Orlserg\UtmRecorder\UtmRecorderFacade::class, ],
Publish the config and migration files:
php artisan vendor:publish --provider="Orlserg\UtmRecorder\UtmRecorderServiceProvider"
Add the \Orlserg\UtmRecorder\Middleware\UtmRecorder::class middleware to App\Http\Kernel.php after the EncryptCookie middleware:
protected $middleware = [ \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \App\Http\Middleware\EncryptCookies::class, \Kyranb\Footprints\Middleware\CaptureAttributionDataMiddleware::class, ];
Go over the configuration file, and set up settings:
// your own visitor table 'link_visits_with' => 'visitors', // your own visitor model 'link_visits_with_model' => \App\Visitor::class,
Run:
$ php artisan migrate
Link your own visitor model with visits table like so:
public function visits() { return $this->HasMany(Visit::class, 'owner_id', 'id'); }
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-22