[Huawei Developers] ritesh_chanchal:
In the last article, we discussed how the ever-changing needs of event tracking have created challenges for operations personnel, and how HUAWEI Dynamic Tag Manager (DTM) can help you report events to analytics platforms. During this process, you can finish all relevant configurations without having to pester your developer about modifying code – instead, you can just modify events to track, and create a configuration version in DTM. But one question remains: How can I verify a configuration version?

This can be done with one of the functions in DTM: previewing a version. It allows you to preview any configuration version you've created and check the reported data, which paves the way forward for releasing a configuration version.

Now let's move on to how to use this function to verify a configuration version. There are three parts involved: starting preview, verifying data, and stopping preview.

Ø Starting preview

Step 1. On the Version tab page, click the name of the version to be previewed to go to the Version details page.

Step 2. Click Preview. On the page displayed, there are three methods for starting preview:

a. Mobile browser preview

b. Scan QR code using mobile browser

c. Preview with ADB commands

Step 3. Start preview with method b, which is most convenient in most cases. Open the mobile browser to scan the QR code. The browser will then display a preview page.

Step 4. Tap Start. The browser then prompts you to open a specified app. Next, tap OPEN to open the app and start preview. A blue button will appear in the app, indicating that the preview mode has been enabled.

Blue button

Ø Verifying data

After the preview mode has been enabled, the configuration version is loaded on the mobile phone. Perform relevant operations in the app to report corresponding events, and then verify the event data reported to the specified analytics platform.

n Reporting data in real time

To report tracked events to an analytics platform in real time, you'll first need to enable the debug mode for this platform.

To report data to HUAWEI Analytics in real time, run the following command to enable the debug mode:

adb shell setprop debug.huawei.hms.analytics.app <package_name>

To report data to Firebase in real time, run the following command to enable the debug mode:

adb shell setprop debug.firebase.analytics.app <package_name>

To report data to other platforms in real time, run the following command to enable the debug mode:

adb shell setprop debug.huawei.hms.dtm.app <package_name>

n Checking data

Let's take the event of adding a product to the shopping cart as an example. After triggering this event, you'll be able to find its data in Google Analytics. This page presents an event whose Event Category is Click and Event Action is Add2Cart.

Click this event to check its details. On the page displayed, Huawei P40 Pro appears under Event Label, which indicates that the version in preview has been correctly configured.

Ø Stopping preview

Under End preview on the Preview page, three methods are provided to stop previewing a configuration version: Stop mobile browser preview, Scan QR code using mobile browser, and Stop preview with ADB commands. The blue button mentioned earlier can be used as well. Tap this button to have a popup display, which asks whether to stop preview. Tap EXIT to end the preview.

For more details, you can go to>>

For more details, you can go to:

l Our official website

l Our Development Documentation page, to find the documents you need

l Reddit to join our developer discussion

l GitHub to download demos and sample codes

l Stack Overflow to solve any integration problems

Original Source