SDK 数据上报
Getting Started
import Report, { Channel } from '@intlsdk/report';
Report.init({
env: 'sg',
gameId: 11,
sigKey: 'xxx',
channelId: Channel.Guest,
appVersion: '1.2.3',
openId: 'clzhu',
});
Report.extend({ openId: 'clzhu' });
Report.reportEvents({
srcId: 1000,
eventName: 'monitor',
ret_code: 0,
});
Report.reportEvents([
{
srcId: 1000,
eventName: 'monitor',
ret_code: 0,
},
{
srcId: 1000,
eventName: 'http',
ret_code: 0,
},
]);
env 参数
env
参数兼容 2 种写法:区域标识简写
和完整url前缀
,满足https://{env}-dr.intlgame.com
格式的域名都可以使用区域标识简写
方式
区域标识简写
sg
新加坡,与https://sg-dr.intlgame.com
(完整 url 前缀)等效,下同na
北美(azure)mos
俄罗斯jp
日本eu
欧洲aws-na
北美sa
南美lonelyfish
lonelyfish 现网独立集群us
硅谷(腾讯云)in
印度
完整 url 前缀
任意 url 域名前缀,必须含https://
,示例:https://sg-dr.intlgame.com
,与sg
(区域标识简写)等效