Deep Linking Terpadu (Unified Deep Linking/UDL)
Perlindungan privasi 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
.
Alur UDL
- SDK dipicu oleh:
- Deferred Deep Linking - menggunakan API khusus
- Deep Linking Langsung - dipicu oleh OS melalui Tautan Aplikasi Android, Tautan Universal iOS, atau skema URI.
- The SDK triggers the
OnDeepLink
metode, dan meneruskan objek hasil deep link ke pengguna. - The
OnDeepLink
metode ini menggunakan objek hasil deep link yang menyertakandeep_link_value
dan parameter lain untuk menciptakan pengalaman yang dipersonalisasi bagi pengguna, yang merupakan tujuan utama OneLink.
Pertimbangan
- Membutuhkan AppsFlyer Android SDK V6.1.3 atau versi lebih baru.
- Tidak mendukung kampanye SRN.
- For new users, the UDL method only returns parameters relevant to deferred deep linking:
deep_link_value
anddeep_link_sub1-10
. Jika Anda mencoba mendapatkan parameter lain (media_source, kampanye, af_sub1-5, dll.), mereka kembalinull
. onAppOpenAttribution
tidak akan dipanggil. Semua kode harus dimigrasikan keOnDeepLink
.OnDeepLink
harus dipanggil setelahnyainitSDK
.AppsFlyer.cs
harus dilampirkan ke objek game.
Penerapan
- Tempel
AppsFlyer.cs
skrip ke objek game dengan kode init AppsFlyer. (AppsFlyerObject) - Call initSDK with the
this
parameter in order for theOnDeepLinkReceived
callback to be invoked:AppsFlyer.initSDK("devkey", "appID", this);
- Tetapkan
OnDeepLink
toAppsFlyer.OnDeepLinkReceived
padaStart()
AppsFlyer.OnDeepLinkReceived += OnDeepLink;
- Setelah
initSDK()
menerapkanOnDeepLink
.
Contoh
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;
}
}
}
Diperbarui 18 hari yang lalu