承接 userlog/php 相关项目开发

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

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

userlog/php

最新稳定版本:v1.0.2

Composer 安装命令:

composer require userlog/php

包简介

UserLog PHP SDK

README 文档

README

Installation

composer require userlog/php

Usage

Initialize Client

use UserLog\PHP\Client;

$userlog = new Client('<API_KEY>', '<PROJECT_NAME>');

The project name will be auto-injected in all requests.

Log

// The channel name, event name and user_id are the only required parameters.
$userlog->log('subscriptions', 'User subscribed!', 'user@example.com');

// Other parameters can be added when needed.
$userlog->log(
    channel: 'subscriptions',
    event: 'User subscribed!',
    user_id: 'user@example.com',
    description: 'A new user subscribed to the premium plan.',
    icon: '👍🏼',
    notify: true,
    tags: [
        'payment-method' => 'card',
        'plan' => 'monthly',
    ],
);

Identify

// Both the user id and the properties are required.
$userlog->identify(
    userId: 'user@example.com',
    properties: [
        'active' => 'yes',
        'signed-in' => 'no',
    ],
);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-11