目录
此内容是否有帮助?

# Automatic Event Tracking

Cocos2d-x SDK Automatic Event Tracking events including installation,open,close etc.

# 1. Introduction

TE provides Apis for automatic data tracking. You can select the data to be tracked based on your needs.

Currently, the following types of events can be tracked automatically:

  1. Install: behavior of APP installation
  2. Open APP: including activiting APP and resuming APP from the background
  3. Close APP: including disabling the APP and calling in the background while tracking the duration of the enabling process

See below for more details on how to start tracking these events.

You can call enableAutoTrack to enable the auto-tracking function:

//enable autotrack event
ThinkingAnalyticsAPI::enableAutoTrack();

Since v1.3.2, Support setting custom property for Automatic Event Tracking. the custom property will be merged into the event properties and reported.

TDJSONObject autoProperties;
autoProperties.setString("auto_track_key", "auto_track_value");
ThinkingAnalyticsAPI::enableAutoTrack(autoProperties);