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 and deep_link_sub1 to deep_link_sub10. If you try to get any other parameters (media_source, campaign, af_sub1-5, etc.), they return null.

Flujo UDL

  1. 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.
  2. The SDK triggers the OnDeepLink y pasa el objeto resultado del enlace profundo al usuario.
  3. The OnDeepLink utiliza el objeto resultado del enlace profundo que incluye el deep_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 and deep_link_sub1-10. Si intentas obtener otros parámetros (media_source, campaign, af_sub1-5, etc.), devuelven null.
  • onAppOpenAttribution no se llamará. Todo el código debe migrar a OnDeepLink.
  • OnDeepLink debe ser llamado después de initSDK.
  • AppsFlyer.cs debe estar unido al objeto de juego.

Implementación

  1. Adjunta AppsFlyer.cs al objeto de juego con el código init de AppsFlyer. (AppsFlyerObject)
  2. Call initSDK with the this parameter in order for the OnDeepLinkReceived callback to be invoked:
    AppsFlyer.initSDK("devkey", "appID", this);
    
  3. Asigna OnDeepLink to AppsFlyer.OnDeepLinkReceived en la carga útil de Start()
     AppsFlyer.OnDeepLinkReceived += OnDeepLink;
    
  4. Después de initSDK() implementa OnDeepLink.

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;
      }
  }
}