-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Plugin Version
6.17.2
App ID
No response
Platform(s)
Android
What did you do?
Attempted to upgrade the app from appsflyer version 6.16.2 -> 6.17.2
Deferred linking were working as expected on 6.16.2
Our react native version: 0.78
- Upgraded the lib 6.16.2 -> 6.17.2
- Created AppTester pre-release prod build
- Test for general deep linking ( app preinstalled ) worked ✅
- Test for deferred linking failed 🔴 (app is not preinstalled but downloaded from the pre-release AppTester)
What did you expect to happen?
Expected the deferred linking to perform the same was as they currently do on version 6.16.2 :
- Deferred linking had to be initiated an invitation link had to be identified .
- Link tracking had to be reported to our logging systems
What happened instead?
Deferred linking test for invitation links did not produce any result. Link was not recognised, connection logic was skipped and no logging trace was left.
With the deferred deep linking we are short on debugging options ( if you have suggestions or better solutions let us know) .
Any other relevant information
Integration was done up to specs and works in prev version. If you require any particular code samples let us know. Here are some parts of integration. (none of logs are triggered , everything fails silently).
/**
- Listen to AppsFlyer deep links
*/
appsFlyer.onDeepLink((res) => {
try {
Logger.log("AppsFlyer onDeepLink called", res);
return handleAppsFlyerDeepLinking(res);
} catch (error) {
Logger.error("Error handling AppsFlyer deep link", error);
}
});
/**
- Initial AppsFlyer options.
*/
const appsFlyerOptions = {
devKey: staticConfig.appsFlyer.devKey,
appId: staticConfig.appsFlyer.appId,
onInstallConversionDataListener: true,
onDeepLinkListener: true,
isDebug: isNotProd(),
} as const;
Appsflyer as a first thing prio on app start
Tracking and link handler :
export const handleAppsFlyerDeepLinking = async (
res: UnifiedDeepLinkData,
): Promise<void> => {
try {
const {
campaign,
deep_link_value,
deep_link_sub1,
link,
media_source,
custom_param,
...rest
} = res.data;
const mappedDeepLinkStatus: AnalyticsDeeplinkStatus =
mapAppsFlyerDeepLinkToAnalyticsStatus(res.deepLinkStatus);
// If token is missed the inner error handling would be triggered further in the execution line and flow would be handled with special ui
const token = deep_link_sub1 ?? custom_param;
//We rely on deep_link_value only, if it exists logs and tracking will be created and initiation handled as expected
const isInvitationLink = deep_link_value === INVITE_VIA_LINK;
const connectToken = isInvitationLink ? token : "NOT_FOUND";
const deepLinkSource = isInvitationLink
? AnalyticsDeeplinkSource.CONNECT
: AnalyticsDeeplinkSource.CAMPAIGN;
const deepLinkParameters = {
deep_link_sub1,
custom_param,
};
//Register initial deep link properties that tracks the first ever appsflyer deep link received to mixpanel
registerSuperPropertiesOnce({
initialDeepLinkSource: deepLinkSource,
initialDeepLinkIsDeferred: res.isDeferred,
initialDeepLinkValue: deep_link_value,
initialDeepLinkParameters: {
deep_link_sub1,
},
});
// For invitation links save token to device state for flow handling and track the deep link
if (isInvitationLink) {
trackAppsFlyerInviteViaDeepLink({
deepLinkSource,
deepLinkUrl: link,
deepLinkStatus: mappedDeepLinkStatus,
deepLinkValue: deep_link_value,
deepLinkIsDeferred: res.isDeferred,
deepLinkParameters,
connectToken,
otherProperties: rest,
status: res.status,
});
dispatch(
deviceStateActions.update({
inviteViaLinkToken: token,
}),
);
dispatch(
sessionStateActions.update({
deepLinkTrackingToken: token,
}),
);
} else {
// Track the AppsFlyer deep link event for partnership campaigns
trackAppsFlyerCampaignDeepLink({
deepLinkSource,
deepLinkUrl: link,
deepLinkStatus: mappedDeepLinkStatus,
deepLinkValue: deep_link_value,
deepLinkIsDeferred: res.isDeferred,
deepLinkParameters,
campaignName: campaign,
otherProperties: rest,
status: res.status,
mediaSource: media_source,
});
}
} catch (error) {
Logger.error(
"Failed to get initialUrl in handleAppsFlyerDeepLinking",
error,
);
}
};