alt-three/segment 问题修复 & 功能扩展

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

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

alt-three/segment

最新稳定版本:v3.5.0

Composer 安装命令:

composer require alt-three/segment

包简介

A Segment bridge for Laravel

README 文档

README

Alt Three Segment

Build Status StyleCI Status Software License Packagist Downloads Latest Version

Installation

Alt Three Segment is a Segment bridge for Laravel. This version requires PHP 7.1-7.4, and supports Laravel 5.5-8. Simply require the package using Composer:

$ composer require alt-three/segment:^3.5

Once installed, if you are not using automatic package discovery, then you need to register the AltThree\Segment\SegmentServiceProvider service provider in your config/app.php.

Configuration

Alt Three Segment requires configuration.

To get started, you'll need to publish all vendor assets:

$ php artisan vendor:publish

This will create a config/segment.php file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

Usage

Once you've set your write_key value in the configuration, you're ready to go! For the most part you can follow Segments own instructions however, you'll want to replace the Analytics classname with Segment - plus, you don't need to call class_alias.

Identify the user

Segment::identify([
    'userId' => '12345abcde',
    'traits' => [
        'name' => 'James Brooks',
        'email' => 'test@test.com',
    ],
]);

Track actions

Segment::track([
    'userId' => '12345abcde',
    'event' => 'Did something',
    'properties' => [
        'was_awesome' => true,
    ],
]);

Security

Our full security policy is available to read here.

License

Alt Three Segment is licensed under The MIT License (MIT).

统计信息

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

GitHub 信息

  • Stars: 59
  • Watchers: 7
  • Forks: 37
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-26