Liên kết Sâu Hợp nhất (UDL)

UDL flow

  1. SDK được kích hoạt bởi:
    • Liên kết Sâu bị Trì hoãn - sử dụng API dành riêng
    • Liên kết Sâu Trực tiếp - được hệ điều hành kích hoạt thông qua Liên kết Ứng dụng Android, Liên kết Chung iOS hoặc lược đồ URI.
  2. The SDK triggers the OnDeepLink listener, and passes the deep link result object to the user.
  3. The OnDeepLink listener uses the deep link result object that includes the deep_link_value và các thông số khác để tạo trải nghiệm được cá nhân hóa cho người dùng, đó là mục tiêu chính của OneLink.

Xem tài liệu về Liên kết Sâu Hợp nhất dành cho AndroidiOS.

Considerations:

  • Yêu cầu SDK Android AppsFlyer V6.1.3 trở lên.
  • Không hỗ trợ các chiến dịch SRN.
  • Does not provide af_dp in the API response.
  • onAppOpenAttribution will not be called. All code should migrate to onDeepLink.

Implementation:

Important The code implementation for onDeepLink must be made prior to the initialization code of the SDK.

Ví dụ:

const onDeepLinkCanceller = appsFlyer.onDeepLink(res => {
  if (res?.deepLinkStatus !== 'NOT_FOUND') {
        const DLValue = res?.data.deep_link_value;
        const mediaSrc = res?.data.media_source;
        const deepLinkSub1 = res?.data.deep_link_sub1; // get up to 10 custom OneLink params
    
    [...]
    
    const deepLinkSub10 = res?.data.deep_link_sub10; // get up to 10 custom OneLink params
        console.log(JSON.stringify(res?.data, null, 2));
      }
})

appsFlyer.initSdk(
  {
    devKey: 'K2***********99',
    isDebug: false,
    appId: '41*****44',
    onInstallConversionDataListener: true,
    onDeepLinkListener: true // -->  you must set the onDeepLinkListener to true to get onDeepLink callbacks
  },
  (result) => {
    console.log(result);
  },
  (error) => {
    console.error(error);
  }
);