Socket
Socket
Sign inDemoInstall

@intlsdk/report

Package Overview
Dependencies
2
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @intlsdk/report

## Getting Started


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

SDK 数据上报

Getting Started

import Report, { Channel } from '@intlsdk/report';

// 初始化(获取session_id并自动上报start事件)
Report.init({
  env: 'test', // 环境或后台域名
  gameId: 11, // INTL 分配的游戏 ID
  sigKey: 'sigkey', // SDK_KEY
  channelId: Channel.Guest, // 登录渠道 ID
  appVersion: '1.2.3', // 业务应用版本号
  openId: 'clzhu', // 用户ID
});

// 扩展选项(不生成session_id)
Report.extend({ openId: 'clzhu' });

// 上报kv数据(兼容数组方式批量上报,详见下方示例)
Report.reportEvents({
  srcId: 1000, // 数据源ID
  eventName: 'monitor', // 事件名称
  // 以下为其他自定义字段,详见tlog文档
  foo: 11,
  bar: 12,
});

// 批量上报kv数据
Report.reportEvents([
  {
    srcId: 1000, // 数据源ID
    eventName: 'monitor', // 事件名称
    // 以下为其他自定义字段,详见tlog文档
    foo: 11,
    bar: 12,
  },
  {
    srcId: 1000, // 数据源ID
    eventName: 'http', // 事件名称
    // 以下为其他自定义字段,详见tlog文档
    foo: 'abc',
    bar: '123',
  },
]);

FAQs

Last updated on 26 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc