目录

Variable Data Types

DOM Element

Field

Option

Description

Selection method

Element ID

Selects a DOM element based on the unique ID of the specified HTML element.

CSS selector

Selects a DOM element based on the ID, class, and others.

Attribute

-

Name of the DOM element attribute whose value needs to be obtained.

If this parameter is left empty, the text content of the DOM element will be obtained.

Element Attribute

Field

Option

Description

Attribute

-

Element attribute to be obtained, for example, id, class, and name.

Default value

-

Default value which will be returned if no element is matched or the matched element does not have the target attribute.

Element Visibility

Field

Option

Description

Selection method

Element ID

Selects a DOM element based on the unique ID of the specified HTML element.

CSS selector

Selects a DOM element based on the ID, class, and others. If multiple elements are matched, the first matched element will be used.

Output type

True/False

Indicates whether an element is visible on the screen. If the element reaches the minimum visible percentage, the value true is returned. Otherwise, the value false is returned.

Percentage

Indicates the visible percentage of an element on the screen.

The value ranges from 0 to 100.

Min. visible percentage

-

Minimum visible percentage of an element on the screen. The value true is used for the variable only when Output type is set to True/False and the visible percentage of the specified element reaches the specified minimum visible percentage.

First-party Cookie

Field

Option

Description

Cookie

-

Name of the cookie whose value needs to be obtained.

URL decoding

-

Indicates whether to enable URL decoding.

If you select Enable, URL decoding will be performed for the obtained value of the first-party cookie. For example, age%3D4 will be decoded as age=4.

recordTier Variable

Field

Description

recordTier variable

Name of a custom recordTier variable. This field is mandatory. The length cannot exceed 1000 characters.

For example, the code for setting recordTier variable key to value is as follows:

recordTier.push({'key': 'value'});
NOTE:

The recordTier variable field works at the web page level instead of the session level.

Default value

Indicates whether to use the default value.

If this field is selected, you can set a default value for value. The default value will be used for the recordTier variable if it is left empty.

Google Analytics Setting

Field

Description

Tracking ID

Measurement ID or network media resource ID, which is in UA-XXXX-Y format.

This field is mandatory. You need to register a tracking ID. For details, please refer to Set up the Analytics global site tag.

Custom dimensions

Custom data attributes. The key is the numeric index, which must be a positive integer. Up to 200 dimensions are allowed for a Google Analytics 360 account and 20 for a non-Google Analytics 360 account.

Custom indicators

Custom data to be measured. The key is the numeric index, which must be a positive integer. The value must be a number. Up to 200 indicators are allowed for a Google Analytics 360 account and 20 for a non-Google Analytics 360 account.

Content group

Web page content group. The key must be a positive integer. Up to 5 content groups are allowed. The value is words separated by slashes (/), for example, a/b/c and HUAWEI/phone. Up to 100 words are allowed.

Enable Google Advertising ID

Select this parameter if you want to integrate the following functions from Google: app installation conversion, audience feature report, audience interest report, and Google Analytics remarketing.

Name

Tracker name. The default value is dtmX. (In the value, X is an auto-increment integer used to distinguish different trackers.)

Client ID

ID identifying a browser instance in anonymous mode. It is generated randomly and stored in the cookie of Google Analytics, with a validity period of two years.

Sample rate

Proportion of users to track. The default value 100 indicates to track all users. You may need to reduce the sample rate for large websites to prevent sampled data from exceeding the processing limit of Google Analytics.

Web app speed sample rate

Frequency for sending web app speed beacons. By default, the system will automatically measure 1% of users.

Treat other pages on the host as referrals

The HTTP referral URL for attribution analysis is sent only when the host name of the referral page differs from that of the current page. If you select this field, other pages on the host will be treated as referrals.

Search for custom campaign parameters in the anchor

By default, analytics.js searches for custom campaign parameters such as utm_source and utm_medium in both the query string and anchor of the current URL. If you deselect this field, custom campaign parameters in the anchor will be ignored.

Cookie name

Name of the cookie for storing analytics data. The default value is _ga.

Cookie domain

Domain for storing analytics cookies. The default value is document.location.hostname. You are advised to set this field to auto. If this parameter is set to none, no domain will be specified during cookie setting.

Cookie validity period

Validity period of a cookie, in seconds. The default value is 63072000 (two years).

Write campaign information to a cookie

By default, analytics.js writes campaign information to a cookie for storage. You can deselect this parameter to not write campaign information to a cookie.

Legacy cookie domain

Indicates how analytics.js searches for cookies generated by earlier Google Analytics scripts such as ga.js and urchin.js. This field has no default value.

Enable analytics.js to import historical data from ga.js cookies

Indicates whether analytics.js should attempt to import historical data from the ga.js cookies.

Enable parsing of domain linker parameters

Indicates whether parsing of cross-domain linker parameters (for passing status across domains) is enabled.

Regular Expression Table

Field

Option

Description

Select variable

-

Variable whose value will be matched with the key in the regular expression table.

Regular expression table

Expression/Output

A group of key-value pairs used for matching with the value of the selected variable. Records in the regular expression table will be matched in a top-down sequence.

If a Key value matches with the value of the selected variable, the Value value corresponding to the Key value will be returned.

Default value

-

If Enable next to this parameter is selected, the specified default value will be returned when no matching record is found in the regular expression table.

Case insensitive

-

If this check box is selected, the matching is case insensitive.

Exact match

-

If this check box is selected, ^ and $ will be implicitly added before and after the regular expression for full match.

For example, /^eat$/ does not match "neatly", but matches "eat".

Match and replace

-

If this check box is selected, you can use the dollar sign ($) syntax to include some input content in output. For example, when /I want to (drink) some (water)/ matches I want to drink some water, the output for He needs to $1 more $2 is He needs to drink more water.

Web Mapping Table

Field

Option

Description

Select variable

-

Variable whose value will be matched with Input values in the mapping table.

Mapping table

Input/Output

A group of key-value pairs used for matching with the value of the selected variable. Records in the regular expression table will be matched in a top-down sequence.

If an Input value matches with the value of the selected variable, the Output value corresponding to the Input value will be returned.

Default value

-

If Enable next to this parameter is selected, the specified default value will be returned when no matching record is found in the mapping table.

URL

Field

Option

Description

URL element

Complete URL

Complete URL of a web page.

Protocol

Protocol of a web page.

Host name

Host name of the web page.

If you want to remove www from the URL, select Remove www. By default, Remove www is not selected.

Port

Port number.

Path

URL path. You can filter paths by Default page.

The value of Default page is a collection of strings, for example, ["text","readme","index.html",...]. The value length must meet the following requirements:

  1. The array can contain up to 100 strings.
  2. Each string in the array can contain up to 1000 characters.

If the string after the last slash (/) in the URL matches any string in the value of Default page, the string after the last slash (/) will be removed.

For example, if the default page is index.html and the URL is https://www.xyz.com/a/b/c/index.html, the variable value is /a/b/c/.

File name extension

File name extension in the URL.

Parameter

Parameter name used to obtain the parameter value from the URL.

The first matched non-escaped parameter value is used as the variable value.

For example, if the parameter name is type and URL is https://www.xyz.com/?type=cloth&index=0, the variable value is cloth.

The parameter name can contain up to 1000 characters.

Fragment

Fragment of the URL. (Fragment beginning with #.)

HTTP Source Website

Field

Option

Description

URL element

Complete URL

Complete URL of a web page.

Protocol

Protocol of a web page.

Host name

Host name of the web page.

If you want to remove www from the URL, select Remove www. By default, Remove www is not selected.

Port

Port number.

Path

URL path. You can filter paths by Default page.

The value of Default page is a collection of strings, for example, ["text","readme","index.html",...]. The value length must meet the following requirements:

  1. The array can contain up to 100 strings.
  2. Each string in the array can contain up to 1000 characters.

If the string after the last slash (/) in the URL matches any string in the value of Default page, the string after the last slash (/) will be removed.

For example, if the default page is index.html and the URL is https://www.xyz.com/a/b/c/index.html, the variable value is /a/b/c/.

File name extension

File name extension in the URL.

Parameter

Parameter name used to obtain the parameter value from the URL.

The first matched non-escaped parameter value is used as the variable value.

For example, if the parameter name is type and URL is https://www.xyz.com/?type=cloth&index=0, the variable value is cloth.

The parameter name can contain up to 1000 characters.