Cafe Bazaar Install Referrer
The Cafe Bazaar Install Referrer plugin is available starting with Adtrace Android SDK 3.0.1. It is not included in SDK version 2.6.0.
Use the optional Cafe Bazaar Install Referrer plugin when your Android app is distributed on Cafe Bazaar. The plugin reads the Cafe Bazaar install referrer and sends it to Adtrace as an sdk_click, the same way Google Play / Samsung / Xiaomi / Vivo / Myket referrers work.
Before you start, complete Getting started with the Android SDK and initialize the core Adtrace SDK.
Add this plugin only if you publish on Cafe Bazaar. Apps that target Google Play alone can skip it.
Add the JitPack repository
Cafe Bazaar’s referrer SDK is hosted on JitPack. Add it to your project repositories (root settings.gradle / build.gradle, or the module that depends on the plugin):
repositories {
mavenCentral()
google()
maven { url "https://jitpack.io" }
}
Add the plugin dependency
Add the Cafe Bazaar plugin next to the core Adtrace SDK in your app build.gradle:
dependencies {
implementation 'io.adtrace:android-sdk:3.0.1'
implementation 'io.adtrace:android-sdk-plugin-cafebazaar:3.0.1'
}
Use the same version for the core SDK and the plugin (SDK 3.0.1+).
The plugin depends on com.github.cafebazaar:referrersdk. Required Cafe Bazaar permission and package visibility entries are merged from that AAR into your app manifest — you do not need to add them manually.
You can also download the plugin AAR from the GitHub releases page.
How it works
When the plugin is on the classpath, Adtrace reads the Cafe Bazaar install referrer automatically on the first session and sends an sdk_click. No extra initialization code is required for the default flow.
With LogLevel.VERBOSE, filter Logcat by the AdTrace tag. A successful Cafe Bazaar referrer read looks similar to:
Path: /sdk_click
ClientSdk: android3.0.1
Parameters:
referrer utm_source=adtrace&utm_campaign=bazaar_test
click_time 1727000000
install_begin_time 1727000100
install_version 1.0.0
referrer_api cafebazaar
referrer, click_time, install_begin_time, and install_version come from Cafe Bazaar when available. referrer_api is always cafebazaar.
Optional: enable or disable Cafe Bazaar reads
By default, Cafe Bazaar referrer reading is enabled when the plugin is present.
- Java
- Kotlin
import io.adtrace.sdk.cafebazaar.AdTraceCafeBazaarReferrer;
// Disable Cafe Bazaar referrer reads
AdTraceCafeBazaarReferrer.doNotReadCafeBazaarReferrer();
// Re-enable (pass application context)
AdTraceCafeBazaarReferrer.readCafeBazaarReferrer(context);
import io.adtrace.sdk.cafebazaar.AdTraceCafeBazaarReferrer
// Disable Cafe Bazaar referrer reads
AdTraceCafeBazaarReferrer.doNotReadCafeBazaarReferrer()
// Re-enable (pass application context)
AdTraceCafeBazaarReferrer.readCafeBazaarReferrer(context)
Proguard / R8
Consumer Proguard rules for the Cafe Bazaar Referrer SDK / AIDL binder are shipped with the plugin. If you need to add them manually:
-keep class com.cafebazaar.referrersdk.** { *; }
-keep interface com.cafebazaar.referrersdk.** { *; }
-keep class com.cafebazaar.servicebase.** { *; }
-keep interface com.cafebazaar.servicebase.** { *; }
-keep interface com.farsitel.bazaar.referrerprovider.** { *; }
-keep class com.farsitel.bazaar.referrerprovider.** { *; }
Test the integration
- Complete core SDK setup with
ENVIRONMENT_SANDBOXandLogLevel.VERBOSE. - Install the app from Cafe Bazaar (or use a Cafe Bazaar test / staging build that provides a referrer).
- Open the app once on a clean install.
- In Logcat (
AdTracetag), confirm that ansdk_clickis sent withreferrer_api=cafebazaar. - In the Adtrace panel, open Settings → Testing Console and verify the install / attribution for your test device.
For Cafe Bazaar’s own sample and binder behavior, see the Cafe Bazaar ReferrerSDK.
Related
- Getting started with the Android SDK — Google Play Install Referrer
- Myket install referrer — another optional store referrer plugin
- Huawei devices (OAID) — another optional Android plugin under Special Cases
- Android SDK GitHub repository