orlserg/utm-recorder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固