Enlaces profundos unificados (UDL)
Protección de privacidad de UDL
For new users, the UDL method only returns parameters relevant to deferred deep linking:
deep_link_value
anddeep_link_sub1
todeep_link_sub10
. If you try to get any other parameters (media_source
,campaign
,af_sub1-5
, etc.), they returnnull
.
Flujo UDL
- El SDK se activa por:
- Enlaces profundos diferidos: usando una API dedicada
- Enlaces profundos directos: activado por el sistema operativo a través de enlaces de aplicaciones de Android, enlaces universales de iOS o esquema URI.
- The SDK triggers the
OnDeepLink
y pasa el objeto resultado del enlace profundo al usuario. - The
OnDeepLink
utiliza el objeto resultado del enlace profundo que incluye eldeep_link_value
y otros parámetros para crear la experiencia personalizada para los usuarios, que es el objetivo principal de OneLink.
Consulta los documentos sobre los enlaces profundos unificados para Android e iOS.
consideraciones
- Requiere el SDK de AppsFlyer para Android V6.1.3 o posterior.
- No admite campañas SRN.
- For new users, the UDL method only returns parameters relevant to deferred deep linking:
deep_link_value
anddeep_link_sub1-10
. Si intentas obtener otros parámetros (media_source, campaign, af_sub1-5, etc.), devuelvennull
. onAppOpenAttribution
no se llamará. Todo el código debe migrar aOnDeepLink
.OnDeepLink
debe ser llamado después deinitSDK
.AppsFlyer.cs
debe estar unido al objeto de juego.
Implementación
- Adjunta
AppsFlyer.cs
al objeto de juego con el código init de AppsFlyer. (AppsFlyerObject) - Call initSDK with the
this
parameter in order for theOnDeepLinkReceived
callback to be invoked:AppsFlyer.initSDK("devkey", "appID", this);
- Asigna
OnDeepLink
toAppsFlyer.OnDeepLinkReceived
en la carga útil deStart()
AppsFlyer.OnDeepLinkReceived += OnDeepLink;
- Después de
initSDK()
implementaOnDeepLink
.
Ejemplo
using AppsFlyerSDK;
public class AppsFlyerObjectScript : MonoBehaviour
{
void Start()
{
AppsFlyer.initSDK("devkey", "appID", this);
AppsFlyer.OnDeepLinkReceived += OnDeepLink;
AppsFlyer.startSDK();
}
void OnDeepLink(object sender, EventArgs args)
{
var deepLinkEventArgs = args as DeepLinkEventsArgs;
switch (deepLinkEventArgs.status)
{
case DeepLinkStatus.FOUND:
if (deepLinkEventArgs.isDeferred())
{
AppsFlyer.AFLog("OnDeepLink", "This is a deferred deep link");
}
else
{
AppsFlyer.AFLog("OnDeepLink", "This is a direct deep link");
}
// deepLinkParamsDictionary contains all the deep link parameters as keys
Dictionary<string, object> deepLinkParamsDictionary = null;
#if UNITY_IOS && !UNITY_EDITOR
if (deepLinkEventArgs.deepLink.ContainsKey("click_event") && deepLinkEventArgs.deepLink["click_event"] != null)
{
deepLinkParamsDictionary = deepLinkEventArgs.deepLink["click_event"] as Dictionary<string, object>;
}
#elif UNITY_ANDROID && !UNITY_EDITOR
deepLinkParamsDictionary = deepLinkEventArgs.deepLink;
#endif
break;
case DeepLinkStatus.NOT_FOUND:
AppsFlyer.AFLog("OnDeepLink", "Deep link not found");
break;
default:
AppsFlyer.AFLog("OnDeepLink", "Deep link error");
break;
}
}
}
Actualizado hace 6 meses