筛选项

支持中文广告归因

❗️

请勿在中国以外地区使用

本指南特定于中国,不能用于归因于中国以外的 Android 设备。

概述

中国的移动应用市场是独一无二的,因为,除 Google 外还有数百家应用商店。这需要不同的方法来支持在中国下载的应用的归因。

由于归因提供商主要依靠 Google 的广告标识符(GAID)进行归因 (在中国任何其他应用商店中都无法获得)。因此,必须使用其他设备标识符来准确归因于中国移动应用市场中的安装。

为此,Branch 构建了一个 Android 插件,专门用于获取开源 Android 设备的 IMEI(国际移动设备识别码)。

🚧

与 Google PLAY 不兼容

在 Play Store 列出的应用中使用此模块可能导致该应用从商店中删除。

启用中国版功能

Before you can implement the Branch Android IMEI module, you must enable China Features in your Branch Account.

To enable China Features:

  1. In the left-hand navigation, under Channels & Links, click on Link Settings.
  2. On the General tab, scroll down to the Advanced Settings sections and click to expand.
  3. Click the Enable China Features box.
  4. In the China Advertising Terms and Conditions modal, click the I agree to the China Ads Terms and Conditions**.
  5. Click Continue.
1138

SDK 集成

❗️

限制了 GITHUB REPO 的访问

在实施 Branch Android IMEI 模块之前,您必须联系您的客户经理并接受使用此功能的服务条款。

The Android IMEI module is used by the main Branch Android SDK to inject IMEI data of the device in the requests.

该模块检查 Google Play Services 是否已链接到该应用。如果是,则它将不会获取 IMEI。否则,它将在请求中传递 IMEI。

📘

注意

如果存在但未链接 Google Play Services,则对 IMEI 的请求将导致错误。

  1. To build the .jar file, run the task makeJar

  2. 要读取设备的 IMEI,您需要在Manifest(清单)文件中添加以下权限:
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

  3. Download the .aar file from the main dir and use it with the main Branch SDK as follows.

  4. 复制 .aar file in your app root directory -> libs > Branch-IMEI-release-latestVersion.aar (create libs if needed)

  5. Add the support for libs inside your project/build.gradle

allprojects {
    repositories {
        flatDir {
            dirs 'libs'
        }
    }
}
  1. 添加对 Inside your app/build.gradle 的支持。
    implementation (name:'Branch-IMEI-release-latestVersion', ext:'aar')

  2. 在您的应用类中调用以下内容 ->

onCreate(): import BranchDeviceImei
import io.branch.referral.deviceimei.BranchDeviceImei;
Branch.getInstance().addModule(BranchDeviceImei.get(this));