承接 willarin/yii2-tracker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

willarin/yii2-tracker

Composer 安装命令:

composer require willarin/yii2-tracker

包简介

tracking user sessions

README 文档

README

This extension provides the third party tracking functionality which could be easily integrated into your project. The module is also intended for registration of information about a separate user session, data about the user's device and browser, his behavior on the site during a visit.

Documentation

1. Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require willarin/yii2-tracker "*"

or add

"willarin/yii2-tracker": "*"

to the required section of your composer.json file.

2. Migrations

Before using this extension, we need to prepare the database.

php yii migrate --migrationPath=@willarin/tracker/migrations

3. Usage

Each unique user's URL visit should be registered within a module. Our recommendation is to use bariew/yii2-event-component - eg.

'eventManager' => [
            'class' => 'bariew\eventManager\EventManager',
            'events' => [
                'module\controllers\IndexController' => [
                    'beforeAction' => [
                        ['willarin\tracker\models\SessionUrl', 'saveUrlVisit'],
                    ],
                ],
            ]
        ],   

Once the extension is installed, modify your application configuration to include:

return [
	'modules' => [
	    ...
            'tracker' => [
                'class' => 'willarin\tracker\Module',
            ]
	    ...
	],
	...
]

Tables used

Session This table stores data about cookies, server variables for the session, device type, OS, browser, click's cost and income received from a specific click.

SessionUrl This table stores data about each url visited by the user, duration of url's visit, number of scrolls up and down for a specific url.

SessionEvent This table stores custom data about events, each event could be associated with a certain URL

Person This table stores data about customer and his cookie string identifier

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-08-29