Constructor
new TalkingData()
Methods
enter(page, source)
When visiting a page, a TalkingData application usage statistics tracking event is triggered.
Parameters:
| Name | Type | Description |
|---|---|---|
page |
String
|
The name of the page. |
source |
String
|
The optional source code. If this parameter is not provided, the source code obtained from the URL during initialization is used. |
init(appId, appName, appVersion, defaultSource) → {Promise}
Initialize the SDK of TalkingData.
Parameters:
| Name | Type | Description |
|---|---|---|
appId |
String
|
The App ID of the application in TalkingData. |
appName |
String
|
The name of the application. |
appVersion |
String
|
The version of the application. |
defaultSource |
String
|
The optional default source of the application. |
Returns:
- Type:
-
Promise
A Promise object.
perform(page, action, source)
When an operation is performed on a specified page, the TalkingData application usage statistics tracking event is triggered.
Parameters:
| Name | Type | Description |
|---|---|---|
page |
String
|
The name of the page. |
action |
String
|
The name of the operation. |
source |
String
|
The optional source code. if this parameter is not provided, the source code obtained from the URL during initialization is used. |
trace(event, label)
Triggers the TalkingData application usage statistics tracking event.
Do not call this function directly. It is recommended to use the enter and perform functions.
Parameters:
| Name | Type | Description |
|---|---|---|
event |
String
|
The event. |
label |
String
|
The optional tag. |