1

Android Visual Embedding is an enhancement of Android's full burying. Developers can synchronize the App interface to the DTM interface, and add buried point events on the DTM interface through visual clicks. At present, there are two ways of embedding points in Android visualization: ordinary visualization and embedding according to Tag template.

Compared with code embedding, visual embedding has the following advantages:

R&D personnel only need to complete the DTM SDK integration, eliminating the development cost of adding code and burying points.

The technical threshold is low, and you can directly click to add a buried point event on the DTM interface, which is suitable for direct use by operators.

After the application is released, it is still possible to flexibly add tracking events to solve the problem of insufficient tracking in the early stage.

In this issue, we will use the method of tracking points by tag template, taking the shopping mall app as an example, to introduce how to use Android visual tracking to send tracking events to HUAWEI Analytics. Before starting configuration, your app needs to have integrated Huawei Analytics SDK and DTM Android SDK 5.0 or later. To view the test data in real time, please use the adb command to enable the debug switch (adb shell setprop debug.huawei.hms.analytics.app <package_name> )

1 Establish a connection

First, log in to the AppGallery Connect website and enter the dynamic tag management service page.

Click the "Visual Embedding" menu, and click the "Buy Points by Tag Template" button.

Click the "New" button, add the Huawei Analytics configuration, and click the "Save" button (if you have already created a template, you can click the check button on the left to select it).

Then, the QR code on the right side of your page will automatically refresh, open your mobile browser, and scan the QR code. Click the "Start Connection" button, click the "Open" button to synchronize the App page to the web page. (If it prompts that the QR code is invalid, click the QR code to refresh)

Turn on the circled control switch to get a clearer understanding of which controls can be buried. Currently, only controls with View.setOnClickListener set can be circled and buried.

Android visual embedding supports three types of embedding: current position embedding, same text embedding and similar element embedding. The following will give some examples:

Buried at the current location

The current location buried point is suitable for scenes with stable App page layout. If the app page layout is volatile, consider using the same text to embed points.

First, take the "Add to Cart" event as an example, to introduce how to use the "current location tracking point". Enter the product details page, select the "Add to Cart" button with the mouse and click, select the "Current Location" option in the pop-up dialog box, and click the "OK" button. Add the name of the buried point and related parameters in the form on the right.

You can manually enter the relevant content according to actual needs. You can also add content through the "plus" button, and you can also select elements in the App page as content through the "little hand" button. After the configuration is complete, click the OK button in the lower right corner to complete the configuration

Verify that the configuration is correct and that the "Add to Cart" event can be sent to Huawei Analytics. Click the preview button on the overview page to enter the version preview page, scan the QR code with a mobile browser or start the preview through the adb command.

Click the "Add to Shopping Cart" button in the App to trigger the reporting of tracking events, and check whether the reported events are consistent with the configuration in the DTM in "Application Debugging" in the menu bar of the Huawei Analytics analysis platform. So far, the configuration verification of DTM is completed.

Next, the DTM version can be released to make the configuration take effect for all apps on the live network. Go to the version management page to create and publish a version.

same text

When the layout of the App page changes, the "Current Position" buried point may become invalid. In order to reduce the impact of this defect, the same text embedding is provided. When the position of the embedded point control is volatile and the content remains unchanged, the same text embedding point is preferred.

Taking the "buy product" event as an example (the position of the "buy" button is variable at this time), we will introduce how to use the "same text embedding". Enter the product details page, select the "Buy" button with the mouse and click, select the "Same Text" option in the pop-up dialog box, and click the "OK" button.

Add the name of the buried point and related parameters in the form on the right. You can manually enter the relevant content according to actual needs. You can also add content through the "plus" button, and you can also select elements in the App page as content through the "little hand" button. After the configuration is complete, click the OK button in the lower right corner to complete the configuration

Verify whether the configuration is correct and whether the "purchased item" event can be sent to HUAWEI Analytics. Click the preview button on the overview page to enter the version preview page, scan the QR code with a mobile browser or start the preview through the adb command.

Click the purchase button in the app to trigger the reporting of the tracking event, and check whether the reported event is consistent with the configuration in the DTM in "Application Debugging" in the menu bar of the HUAWEI Analytics platform. So far, the configuration verification of DTM is completed.

Next, the DTM version can be released to make the configuration take effect for all apps on the live network. Go to the version management page to create and publish a version.

Similar elements buried

For list pages implemented through ListView, GridView, RecyclerView, and ViewPager: such as product list pages, carousel images.

If you want to count every tracking event in the list, it is difficult to track through the current location or with the same text. Tracking of similar elements is created to solve this problem.

When you embed an item in the list with the same element embed, the item with the same layout as the embed item will also be embed the same event.

The following takes the product list page as an example to introduce in detail how to use similar elements to bury points. Enter the "Commodity List" page, select any item with the mouse and click, select the "Similar Element" option in the pop-up dialog box, and click the "OK" button. At this point you will see that items with the same layout as the buried items are also framed with a green background.

Add the name of the buried point and related parameters in the form on the right. You can manually enter the relevant content according to actual needs. You can also add content through the "plus" button, and you can also select elements in the App page as content through the "little hand" button. After the configuration is complete, click the OK button in the lower right corner to complete the configuration. Verify that the configuration is correct and that item events can be sent to HUAWEI Analytics.

Click the preview button on the overview page to enter the version preview page, scan the QR code with a mobile browser or start the preview through the adb command. Randomly click on an item in the product list in the App to trigger the reporting of the tracking event, and check whether the reported event is consistent with the configuration in the DTM in "Application Debugging" in the menu bar of the HUAWEI Analytics analysis platform. So far, the configuration verification of DTM is completed.

Next, the DTM version can be released to make the configuration take effect for all apps on the live network. Go to the version management page to create and publish a version.

For more details of HMS Core dynamic tag management service, please refer to the official website

Learn more details>>

Visit the official website of Huawei Developer Alliance
Get development guidance documents
Huawei Mobile Services Open Source Warehouse Address: GitHub , Gitee

Follow us to know the latest technical information of HMS Core for the first time~


HarmonyOS_SDK
596 声望11.7k 粉丝

HarmonyOS SDK通过将HarmonyOS系统级能力对外开放,支撑开发者高效打造更纯净、更智能、更精致、更易用的鸿蒙原生应用,和开发者共同成长。