Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
A variable is a placeholder used in a condition or tag. For example, the App Name variable indicates the name of an Android app.
DTM provides preset variables which can be used to configure most tags and conditions. If preset variables cannot meet your requirements, you can also create your own custom variables. Currently, DTM provides 21 types of preset variables and 8 types of custom variables.
Category |
Variable |
Description |
|---|---|---|
App |
App ID |
App ID, which must be set to the app package name. |
App Name |
Name of an app. |
|
App Version Name |
Name of an app version. |
|
App Version Code |
Version code of an app. |
|
SDK Version |
SDK version number. |
|
Ad |
AppLinking medium |
Marketing media, which can be obtained when your app is launched or updated through App Linking. |
AppLinking promotion name |
Marketing task name, which can be obtained when your app is launched or updated through App Linking. |
|
AppLinking source |
Marketing channel, which can be obtained when your app is launched or updated through App Linking. |
|
Configuration |
Configuration ID |
ID of a configuration. |
Configuration Version |
Release version of a configuration. |
|
Device |
Device ID |
ID of a device. |
Device IP address |
IP address of a device. |
|
Device Name |
Name of a device. |
|
Language |
Language set by the user. |
|
Limit OAID tracking |
Indicates whether to enable ad tracking. |
|
OAID |
Ad identifier. |
|
OS Version |
Version of the operating system where the app is running. The value is a string, for example, 10. |
|
Platform |
Operating system (Android). |
|
Screen Resolution |
Screen resolution of the device where the app is running. The value is in Width x Height format. |
|
HUAWEI Analytics |
Event Name |
Name of a triggered event. |
Utilities |
Random Number |
Random integer ranging from 0 to 2,147,483,647. |
Variable Type |
Description |
|---|---|
Branch variables support the following data types: integer, float, Boolean, character, array, and key-value pair. When using the Branch extension template, you can reference relevant Branch variables based on the value ranges of Branch extension template fields. |
|
Function call |
To obtain the value of a custom variable, you can set the variable type to Function call and specify the path of a class which has implemented the ICustomVariable API. During tag execution, the variable will be set to the value returned by the specified class. When configuring a Function call variable on the DTM portal, you can configure parameter values which can be used in the class for implementing APIs. |
Common parameters of Google Analytics, which facilitates reference by multiple tracker tags. All fields in the variable will be passed to tags of Google Analytics as parameters. |
|
Constant |
You can set a constant value for a variable of this type. |
Mapping table |
A mapping table contains a group of key-value pairs. You can enter a key value and obtain the corresponding parameter value from the table. With the mapping table, you can make the variable value automatically change according to the input value. The following table is a mapping table example. In the example, multiple versions of an app have been released, and the version codes are 1.0, 2.0, and 3.0 respectively. If the defined variable Version ID needs to be set to different values for different app versions, you can define the value mapping for each version in a mapping table. During tag execution, the version code is matched to obtain the variable value. |
Event parameter |
Event parameter, which is generally used to obtain the parameter value of the reported event from the event context during tag execution. |
Installation referrer |
Installation source of an app, which can be obtained when the app is launched for the first time. |
User properties |
User attributes, which are used to obtain the user attribute values when the tracking tag is executed. The user attribute value is set on HUAWEI Analytics. Two methods are available for creating a user attribute:
You can set a default value for a user attribute on the DTM portal. If no user attribute value is obtained during tag execution, the default value will be used. If no default value is set, the user attribute will be left empty when no value is obtained. |