神岛 API 文档 - ArenaPro版
    Preparing search index...

    GameSensorAnalytics 类是神策平台的专业数据分析模块,提供完整的游戏数据采集与分析能力。通过该模块,你可以追踪玩家行为、记录关键事件并构建全面的数据分析体系。

    The GameSensorAnalytics class is the professional data analytics module for the Sensor platform, providing complete game data collection and analysis capabilities. With this module, you can track player behavior, record key events, and build a comprehensive data analytics system.

    Index

    Methods

    Methods

    • Parameters

      • url: string
      • Optionaltimeout: number

      Returns void

      初始化神策埋点配置方法。 用于设置数据接收地址和超时时间。 注意: 以最后一次执行的配置为准。

      Initializes the Sensor tracking configuration. Used to set the data receiving address and timeout period. Note: The configuration from the last execution will be used.

      数据接收地址,神策服务器的 URL。

      The data receiving address, which is the URL of the Sensor server.

      可选,请求超时时间,默认为30s。

      Optional, request timeout in seconds, defaults to 30s.

    • Parameters

      • distinctId: string
      • eventName: string
      • Optionalproperties: Record<string, string | number | boolean>

      Returns void

      追踪数据事件方法。 用于记录用户行为和自定义事件。

      Tracks a data event. Used to record user behavior and custom events.

      用户唯一标识,通常是平台用户 ID (GamePlayer.userId)。

      The user's unique identifier, typically the platform user ID (GamePlayer.userId).

      事件名称。

      The name of the event.

      可选,事件属性 (会被 JSON.stringify 序列化)。

      Optional, event properties (will be serialized with JSON.stringify).