Myket Install Referrer
The Myket Install Referrer plugin is available starting with Adtrace Android SDK 3.0.0. It is not included in SDK version 2.6.0.
Use the optional Myket Install Referrer plugin when your Android app is distributed on Myket. The plugin reads the Myket install referrer and sends it to Adtrace as an sdk_click, the same way Google Play / Samsung / Xiaomi / Vivo 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 Myket. Apps that target Google Play alone can skip it.
Add the Myket Maven repository
Myket’s referrer SDK is hosted on Myket’s Maven repository. 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://maven.myket.ir" }
}
Add the plugin dependency
Add the Myket 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-myket:3.0.1'
}
Use the same version for the core SDK and the plugin (SDK 3.0.0+).
The plugin depends on ir.myket:referrersdk. Required Myket 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 Myket 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 Myket referrer read looks similar to:
Path: /sdk_click
ClientSdk: android3.0.1
Parameters:
referrer utm_source=adtrace&utm_campaign=myket_test
click_time 1727000000
install_begin_time 1727000100
referrer_api myket
referrer, click_time, and install_begin_time come from Myket when available. referrer_api is always myket.
Optional: enable or disable Myket reads
By default, Myket referrer reading is enabled when the plugin is present.
- Java
- Kotlin
import io.adtrace.sdk.myket.AdTraceMyketReferrer;
// Disable Myket referrer reads
AdTraceMyketReferrer.doNotReadMyketReferrer();
// Re-enable (pass application context)
AdTraceMyketReferrer.readMyketReferrer(context);
import io.adtrace.sdk.myket.AdTraceMyketReferrer
// Disable Myket referrer reads
AdTraceMyketReferrer.doNotReadMyketReferrer()
// Re-enable (pass application context)
AdTraceMyketReferrer.readMyketReferrer(context)
Proguard / R8
Consumer Proguard rules for the Myket AIDL binder are shipped with the plugin. If you need to add them manually:
-keep interface com.myket.installreferrer.** { *; }
-keep class com.myket.installreferrer.** { *; }
-keep class ir.myket.referrersdk.** { *; }
Test the integration
- Complete core SDK setup with
ENVIRONMENT_SANDBOXandLogLevel.VERBOSE. - Install the app from Myket (or use a Myket 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=myket. - In the Adtrace panel, open Settings → Testing Console and verify the install / attribution for your test device.
For Myket’s own sample and binder behavior, see the Myket referrer sample.
Related
- Getting started with the Android SDK — Google Play Install Referrer
- Cafe Bazaar install referrer — another optional store referrer plugin
- Huawei devices (OAID) — another optional Android plugin under Special Cases
- Android SDK GitHub repository