We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Getting Started

Before developing your app, you can follow instructions in the codelab to experience how to quickly integrate this kit into an app.

Development Environment

  • JDK version: 1.7 or later
  • Android Studio version: 3.6.1 or later
    • minSdkVersion: 19 or later
    • targetSdkVersion: 33 (recommended)
    • compileSdkVersion: 33 (recommended)
    • Gradle version: 5.4.1 or later (recommended)

    If you need to use multiple HMS Core kits, use the latest versions required for these kits.

  • Test device: a Huawei phone running EMUI 3.0 or later, or a non-Huawei phone running Android 4.4 or later

Background

You can integrate Analytics Kit and DTM into your app to implement tag tracking and event reporting. You need to integrate Analytics Kit before integrating DTM.

Events reported by the DTM SDK fall into the following scopes:

  • Events automatically collected by the Analytics SDK
  • Events tracked using the onEvent method of the Analytics SDK
  • Visual events added on the DTM portal

By default, these events are reported to HUAWEI Analytics. You can configure a tag using the HUAWEI Analytics extension template on the DTM portal to add parameters to or change parameter values in reported events, as well as block some events.

NOTE

Development Process

Follow the steps in the following process when you develop an app.

Visual Event Tracking

Expand

Step

Operation

Description

1

Configure app information in AppGallery Connect

Configure app information in AppGallery Connect, including creating an app, generating a signing certificate fingerprint, configuring the signing certificate fingerprint, and enabling required services.

2

Integrate the SDK

Integrate the SDK into your app.

3

Configure obfuscation scripts

Before building the APK, configure the obfuscation configuration file to prevent the SDK from being obfuscated.

4

Add visual events

Synchronize your app screen to the DTM portal, and click relevant elements on the portal to add visual events for them.

5

Manage versions

Manage your configuration versions. Versions are used to record different phases of a configuration. You can create a version for a configuration anytime to save the latest configuration.

6

Manage configurations

Manage your configuration. A configuration is a policy file containing visual events, tags, conditions, and variables. It can be downloaded and executed by an app or website.

7

Manage reviews

(Optional) Review version release applications. If a user with limited permission wants to release a version, the version release must be reviewed by another user with the review permission. The version can be released only after the release application is approved.

8

Perform client development

Implement event reporting based on your service needs.

9

Perform pre-release check

Use the tool offered by Huawei to automatically check your app before release.

10

Release your app

Complete your app information in AppGallery Connect, and submit your app for release.

Tag-based Event Tracking

Expand

Step

Operation

Description

1

Configure app information in AppGallery Connect

Configure app information in AppGallery Connect, including creating an app, generating a signing certificate fingerprint, configuring the signing certificate fingerprint, and enabling required services.

2

Integrate the SDK

Integrate the SDK into your app.

3

Configure obfuscation scripts

Before building the APK, configure the obfuscation configuration file to prevent the SDK from being obfuscated.

4

Manage tags

Manage your tags, including setting parameters and trigger conditions for tags. A tag is used in your app to track events.

5

Manage conditions

Manage your conditions. A condition is the prerequisite for triggering a tag and determines when the tag is executed. A tag must contain at least one trigger condition.

6

Manage variables

Manage your variables before creating tags or conditions. A variable is a placeholder used in a condition or tag.

7

Manage groups

(Optional) Sort the created variables, conditions, and tags and add them to different groups based on their logical relationships.

8

Manage versions

Manage your configuration versions. Versions are used to record different phases of a configuration. You can create a version for a configuration anytime to save the latest configuration.

9

Manage configurations

Manage your configuration. A configuration is a policy file containing visual events, tags, conditions, and variables. It can be downloaded and executed by an app or website.

10

Manage reviews

(Optional) Review version release applications. If a user with limited permission wants to release a version, the version release must be reviewed by another user with the review permission. The version can be released only after the release application is approved.

11

Perform client development

Implement event reporting based on your service needs.

12

Perform pre-release check

Use the tool offered by Huawei to automatically check your app before release.

13

Release your app

Complete your app information in AppGallery Connect, and submit your app for release.

Tag-based Event Tracking + Visual Event Tracking

Expand

Step

Operation

Description

1

Configure app information in AppGallery Connect

Configure app information in AppGallery Connect, including creating an app, generating a signing certificate fingerprint, configuring the signing certificate fingerprint, and enabling required services.

2

Integrate the SDK

Integrate the SDK into your app.

3

Configure obfuscation scripts

Before building the APK, configure the obfuscation configuration file to prevent the SDK from being obfuscated.

4

Add visual events

Synchronize your app screen to the DTM portal, and click relevant elements on the portal to add visual events for them.

5

Manage tags

Manage your tags, including setting parameters and trigger conditions for tags. A tag is used in your app to track events.

6

Manage conditions

Manage your conditions. A condition is the prerequisite for triggering a tag and determines when the tag is executed. A tag must contain at least one trigger condition.

7

Manage variables

Manage your variables before creating tags or conditions. A variable is a placeholder used in a condition or tag.

8

Manage groups

(Optional) Sort the created variables, conditions, and tags and add them to different groups based on their logical relationships.

9

Manage versions

Manage your configuration versions. Versions are used to record different phases of a configuration. You can create a version for a configuration anytime to save the latest configuration.

10

Manage configurations

Manage your configuration. A configuration is a policy file containing visual events, tags, conditions, and variables. It can be downloaded and executed by an app or website.

11

Manage reviews

(Optional) Review version release applications. If a user with limited permission wants to release a version, the version release must be reviewed by another user with the review permission. The version can be released only after the release application is approved.

12

Perform client development

Implement event reporting based on your service needs.

13

Perform pre-release check

Use the tool offered by Huawei to automatically check your app before release.

14

Release your app

Complete your app information in AppGallery Connect, and submit your app for release.

HMS Toolkit provides end-to-end tools (including those for app creation, free real-device debugging, and releasing) that you need to develop your own HMS Core-integrated app and release it, with lower costs and higher efficiency.