定制 bleckert/openpanel-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

bleckert/openpanel-laravel

最新稳定版本:v2.1.2

Composer 安装命令:

composer require bleckert/openpanel-laravel

包简介

Laravel provider for Openpanel

README 文档

README

Latest Version on Packagist

Simple Laravel provider for Openpanel event tracking.

Installation

You can install the package via composer:

composer require bleckert/openpanel-laravel

Setup

Grab your Openpanel ID and secret by navigating to Settings -> Projects and create a client using typ "Other". You'll then recieve an ID and secret.

Add the following to your .env file:

OPENPANEL_CLIENT_ID=your-id
OPENPANEL_CLIENT_SECRET=your-secret

If you self-host Openpanel, you can set the OPENPANEL_URL variable to your Openpanel URL.

OPENPANEL_URL=https://your-openpanel-url.com

Usage

use Bleckert\OpenpanelLaravel\Openpanel;

$openpanel = app(Openpanel::class);

// Set profile ID that will be used for all events as the `profileId` property.
$openpanel->setProfileId(1);

// Update user profile
$openpanel->identify(
    profileId: 1,
    firstName: 'John Doe',
    lastName: 'Doe',
    email: 'joe@doe.com',
    // ...
);

// Track event
$openpanel->track(
    name: 'User registered',
);

// Increment property
$openpanel->increment('visits');

// Decrement property
$openpanel->decrement('visits');

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-04