Android: Set parameters based on the clicked URL domain

At a glance: Set attribution parameters based on click URL

Visão Geral

Organic search attribution can be set from AppsFlyer without updating the SDK. Learn more.

Use o appendParametersToDeepLinkingURL method to dynamically set the media source and other parameters based on the clicked URL domain name.

Pré-requisitos

  • Android SDK 6.0.1+.
  • Chame este método antes de chamar start.

Uso

Input parameters

TipoNomeDescrição
Stringcontains Um nome de domínio para identificar URLs
Map<String, String>parametersParâmetros a serem anexados ao URL do deep link após a validação

Forneça os seguintes parâmetros no parameters Map:

  • pid
  • is_retargeting=true

Usage example

HashMap<String, String> urlParameters = new HashMap<>();
parameters.put("pid", "exampleDomain"); // Required
parameters.put("is_retargeting", "true"); // Required
AppsFlyerLib.getInstance().appendParametersToDeepLinkingURL("example.com", parameters);
AppsFlyerLib.getInstance().appendParametersToDeepLinkingURL("example.com",
mapOf("pid" to "exampleDomain", "is_retargeting" to "true")) // Required

No exemplo acima, a URL de atribuição enviada aos servidores da AppsFlyer é:

example.com?pid=exampleDomain&is_retargeting=true