Перейти к содержимому

Referrer

Это содержимое пока не доступно на вашем языке.

Install referrer tracking is automatic — “Install referrer tracking is supported automatically, no actions needed”. The core attribution library depends on com.android.installreferrer:installreferrer:2.2 (attribution/build.gradle:63).

Affise.getReferrerUrl(callback: OnReferrerCallback?) (attribution/src/main/java/com/affise/attribution/Affise.kt:170-173).

Affise.getReferrerUrl { referrer ->
// handle referrer
}

Affise.getReferrerUrlValue(key: ReferrerKey, callback: OnReferrerCallback?) (Affise.kt:178-181).

Affise.getReferrerUrlValue(ReferrerKey.CLICK_ID) { value ->
// handle referrer value
}

enum class ReferrerKey(val type: String) at attribution/src/main/java/com/affise/attribution/referrer/ReferrerKey.kt:6-41:

ValueType string
AD_IDad_id
CAMPAIGN_IDcampaign_id
CLICK_IDclickid
AFFISE_ADaffise_ad
AFFISE_AD_IDaffise_ad_id
AFFISE_AD_TYPEaffise_ad_type
AFFISE_ADSETaffise_adset
AFFISE_ADSET_IDaffise_adset_id
AFFISE_AFFC_IDaffise_affc_id
AFFISE_CHANNELaffise_channel
AFFISE_CLICK_LOOK_BACKaffise_click_lookback
AFFISE_COST_CURRENCYaffise_cost_currency
AFFISE_COST_MODELaffise_cost_model
AFFISE_COST_VALUEaffise_cost_value
AFFISE_DEEPLINKaffise_deeplink
AFFISE_KEYWORDSaffise_keywords
AFFISE_MEDIA_TYPEaffise_media_type
AFFISE_MODELaffise_model
AFFISE_OSaffise_os
AFFISE_PARTNERaffise_partner
AFFISE_REFaffise_ref
AFFISE_SITE_IDaffise_siteid
AFFISE_SUB_SITE_IDaffise_sub_siteid
AFFCaffc
PIDpid
SUB_1…SUB_5sub1…sub5
AFFISE_SUB_1…AFFISE_SUB_5affise_sub1…affise_sub5

An extension helper fun String.toReferrerKey(): ReferrerKey? is also provided at ReferrerKey.kt:51.