👨🏼‍💻How to use OAID with AppsFlyer?

Mustafa Dincay
Huawei Developers
Published in
9 min readJun 14, 2022
OAID

Introduction

Hello everyone. In this article, I will explain the integration process and usage of Huawei OAID and AppsFlyer.

What is OAID?

  • It is used to track Android devices in other app stores without Google Play Services.
  • OAID is easily accessible on all devices using HMS (Huawei Mobile Services).

What is a 3rd Party Tracking Platform?

When a company (such as campaign, promotion, announcement, etc.) publishes advertisements for marketing operations, how users interact with this advertisement (eg: how many users clicked on the advertisement, how many users downloaded the application from the advertisement, how many users came from the advertisement) in order to best manage its budget. bought a product, etc.) wants to see it in detail. This requires a series of actions based on tracking of user and user behavior.

Platforms such as AppsFlyer, Adjust, Kochava, Sizmek provide services in this regard.

Android (Client) Side Process

There are a few things you need to do in your application for AppsFlyer and OAID operations. First you need to implement the SDK.

To the project gradle file;

To app gradle file;

you must add the implementations. Then you should call the following codes in the onCreate method of the Application class.

After this stage, if your AppsFlyer SDK version is 6.2.3 or higher, there is nothing you need to do to obtain the OAID data of the device, but if it is a lower SDK version, you should add the following lines of code to the onCreate method of the Application class.

There is a log listening process to test whether all these operations can be done correctly. If the operations were done correctly, when you set Logcat to Verbose level in Android Studio and filtered as “oaid”, you should see a log like the one below. After the “get oaid from:” part, the package name of your application comes.

OAID integration check

Next is the work that needs to be done on the panel side. In order for Huawei Ads and AppsFlyer panels to communicate with each other, several integration processes are required. First of all, Click and Impression URLs must be created in the AppsFlyer panel.

AppsFlyer URLs

Click and Impression URLs created later should be added to the Huawei Ads panel. AppsFlyer should be selected in the Tool provider section and your application should be selected in the App section.

Adding URLs to Huawei Ads

After entering this data on the Huawei Ads panel, you will get a KEY value. You should take this KEY value and enter it in the AppsFlyer panel.

AppsFlyer Panel

After these processes, the transactions between the panels are finished, and the conversions you will use in your campaign are added to both panels. First of all, the conversion to be followed in the Huawei Ads panel should be created.

Huawei Ads Settings
  • App: Select the application you want to track.
  • Conversion actions: Choose on which subjects you want to take transformational actions.
  • Conversion name: Give an easy-to-understand name to the transformation you are about to create.
  • Click attribution window: The period after the ad is clicked and the conversion is generated. Its default value is 30 days and this value cannot be changed after Submit.
  • Display attribution window: It is the period after the ad impression that initiates the conversion. Its default value is 1 day and this value cannot be changed after Submit.
  • Including Conversion Num: You can define counter value for each action you define for conversion actions. For example, if you add to cart 3 times and purchase 2 times in your application, the Conversion Num value will return to you as 5.

You can see all conversions here.

Then the equivalent of the same conversion created in the Huawei Ads panel should be created in the AppsFlyer panel.

AppsFlyer panel integration settings

Conversions added to Huawei Ads must be active in order to start the campaign. This value is inactive when first added. In order to activate this, you need to test the added conversion. Once you pass the test successfully, the conversion will be active.

Unactivated conversion process
Test conversion process

Then, the OAID data of the device to be tested should be entered in the panel that opens.

OAID Panel for testing

You can learn the OAID of the device as follows. Privacy → Ads and Privacy → More Information → Your Ad-ID

Finding out the OAID of the device

After entering the OAID data, you need to download the application with the QR code that appears.

Scan QR to start testing

Afterwards, whichever conversion is tested, that action must be performed. For example, if register conversion is being tested, it is necessary to run the application after downloading and performing the registration process.

Waiting test result

After the test is successful, you will see that the conversion is now active in the Huawei Ads panel. After this stage, the technical processes are finished and you can start your campaign.

End of the process

FAQs

1-) Conversion test cannot be activated. What should I do?

If a Conversion cannot be activated, you can reset the OAID of your device prior to testing, or try to test again with a device that has not been used for testing before.

2-) Do I need to implement MSA’s SDK into my application?

For applications released outside of mainland China, there is no requirement to implement MSA’s SDK into the application. Thanks to the additional SDKs offered by companies such as Adjust and AppsFlyer, HMS can easily access OAID data on devices.

3-) We have been progressing smoothly on the Google side until now, why do we need to do OAID transactions now?

On devices with GMS Core, device and user actions are tracked via GAID (Google Ad ID). Since Huawei devices produced after 2020 do not have GMS Core, the same operations should be done via OAID for devices with HMS Core.

4-) Does integrating OAID increase my application size or adversely affect its performance?

The purpose of OAID SDKs offered by tracking platforms such as AppsFlyer and Adjust is only to access the OAID data on the device and transfer this data to their core structures. For this reason, they are quite light in size.

For example: AppsFlyer OAID SDK is only 11 KB in size. For Adjust, the size of the SDK that performs OAID operations is only about 15 KB.

5-) Why do I get a warning on the log screen when testing on GMS devices after performing OAID operations?

OAID processes only work on HMS Core. Therefore, it is very normal for this warning to appear on devices that do not have HMS Core and does not mean that there is a problem.

6-) What does “Activation” in Huawei Panel mean?

Download: The number of times the app was downloaded as a result of clicking on the ad.

Install: The number of application installations after the ad is clicked.

Activation: The number of times the app was opened for the first time after the ad was clicked, downloaded and installed.

Since the application is not running / not standing up during application download and installation processes, we can monitor Download and Install values ​​via HMS Core and Huawei Ads Panel. Adjust, on the other hand, calls the event Install (that is, a successful installation), which is Activation for Huawei.

7-) Install data always appears organically in AppsFlyer panel

The Dev Key value may be incorrect. If this value is wrong, the number of installs is not considered organic and appears as.

8-) How will the redirect process work after the user clicks on the ad on phones with both HMS and GMS services?

This is related to the provider from which the ad is provided. If the provider of the advertisement that the user sees and clicks is Huawei, the tracking and routing processes after the click will continue for Huawei, if the advertisement is provided by another provider, these processes will continue for that provider.

9-) Why do AppGallery and 3rd Party Tracking Platform panel numbers not match?

There could be many reasons for this event. For example, a user can download your application to both their phone and tablet with the same Huawei account. While 2 downloads are counted on the 3rd Party Tracking platforms side like Adjust, 1 download is counted on the store side.

Or, for another example, if your application has previously gone to the store without installing the 3rd Party Tracking Platform SDK, then all the old users will be counted as new users on the 3rd Party Tracking Platform side when the 3rd Party Tracking Platform is integrated and the update is released. will appear as an update.

Therefore, on the market side, old users will not look like new. For this reason, there may be inconsistency in the numbers for weeks or months after the first update, depending on the size of the application.

10-) Why do only organic install numbers appear despite the SDK implementation?

This situation is most likely; It may be caused by misconfiguration of panel connections between Huawei Ads Panel and third-party tracking platform.

For detailed information, you can review the sections in the document where inter-panel transactions are defined and the documents of third party tracking platforms.

11-) Why are the Impression and Click numbers of Huawei Ads platform and 3rd party tracking platforms different?

Click or impression data is simultaneously reported to HUAWEI Ads and the third-party tracking platform by the media integrated with the HUAWEI Ads SDK. Data difference may occur when there is network packet loss. A number discrepancy between 5% and 10% is considered normal.

12-) Why is the data in the third-party tracking platform different from the data in the HUAWEI Ads reports?

For data returned from a third-party tracking platform, HUAWEI Ads filters the data through a series of actions, including simplification, fraud prevention, and reassociation, and then reports the final result.

For this reason, the indicator values ​​in the HUAWEI Ads reports may be less than those in the third-party tracking platform.

13-) Why does the third-party tracking platform show low or 0 installs?

If the SDK of the third-party tracking platform is not properly integrated or the version used is too low, OAIDs are not collected and most conversions from HUAWEI Ads may be mistakenly counted as organic traffic or other traffic.

14-) Install data is not visible in AppsFlyer panel.

Make sure that the init and start functions are called in the Application class.

Conclusion

In this article, I explained the integration process and usage of Huawei OAID and AppsFlyer. You can easily manage your advertising processes by integrating 3rd party tracking platforms such as AppsFlyer with Huawei OAID.

References

--

--