[Huawei Developers] muraliameakula:
Event tracking is a technology for collecting and processing user behavior data or events, and is widely used for user behavior analysis and data processing. It helps product managers, operations personnel, and data analysts to precisely collect and analyze user behavior data, create user profiles, as well as analyze and optimize products. However, manual event tracking has high requirements in terms of technical skills, as well as requiring a huge workload and a long development period.

The visual event tracking function of Dynamic Tag Management (DTM) was created to deal with such issues. DTM provides multiple solutions for tracking visual events of web pages: common visual event tracking, tag template-based visual event tracking, and visual event tracking by HUAWEI Analytics.

This article will illustrate how to use common visual event tracking.

Prerequisites​

1. You have created an AppGallery Connect account and signed in to it by visiting the following URL address, click here

2. You have created a web app and its DTM configuration.

3. You have created your website and integrated the DTM configuration script into it. To integrate the DTM configuration script, perform the following:

a. Click the Configuration tab and then View in the DTM portal.

b. Copy the code snippet below and paste it to the top of the <head> section of each web page to track, so that the code snippet takes effect in a timely manner.

Common Visual Event Tracking​

A visual event can be used as the trigger condition for reporting events to multiple third-party analytics platforms. This is applicable to scenarios where visual events and parameters need to be adjusted flexibly.

1.1 Accessing the Visual Event Tracking Page​

1. Click the Visual event tab in the DTM portal.

2. Click Start on the page displayed.

1.2 Adding Visual Events​

1. On the Add visual event page displayed, click Add on the right.

2. Select Button or link under Select element for visual event addition. (This option is selected by default.)

3. Select the Detail button under HUAWEI Mate Series on the left page.

Click OK in the displayed dialog box asking you whether to select elements of the same type.

4. Configure visual event information.

a. Enter a visual event name.

b. Click the hand icon, select HUAWEI Mate Xs, and enter a parameter name to add a visual event parameter.

c. Set Triggered on to Specified pages, and add the URL rule URL Equals https://XXXXXX.XXX.

5. Click OK to save the visual event.

6. Click the icon on the right of a visual event to expand it.

7. Click the icon in the upper left corner to exit the visual event tracking page.

1.3 Adding a Tag​

1. Click the Tag tab.

2. Select a tag extension template, and set Trigger condition to MateSeriesView.

3. Click OK.

4. Click Save.

1.4 Creating and Releasing a Version​

1. Click Create on the Version tab page.

2. On the Create version page, enter a version name and description.

3. Select Create and release version.

4. Click OK.

1.5 Triggering a Visual Event​

1. Refresh the tested website and download the latest DTM configuration.

Note: By default, the DTM JavaScript SDK downloads the latest DTM configuration to the cache every 15 minutes. To download the latest DTM configuration immediately, disable the browser cache and refresh the tested website again.

2. Click any Detail button under HUAWEI Mate Series.

3. View reported data on the specified third-party analytics platform.

To learn more about DTM, click here.

For more details, you can go to:

Reddit to join our developer discussion

GitHub to download demos and sample codes

Stack Overflow to solve any integration problems

Original Source