Branch SDK Deep Linking does not work when Tracking is disabled

99 Views Asked by At

I am trying to resolve an issue with Branch.io Deep Links only working some of the time. Specifically: When the app is closed, the links open it but the Referral Parameters returned by public InitSessionBuilder withCallback(BranchReferralInitListener callback) are set to: {"+clicked_branch_link":false,"+is_first_session":false}. When the app is already running in the background, it sometimes returns the same {"+clicked_branch_link":false,"+is_first_session":false}, and sometimes it returns the parameters of an old Deep Link I clicked previously, but not the most recent one.

I have managed to narrow it down to one variable: When I set Branch.getInstance().disableTracking(true), the links stop returning the correct Referral Parameters. If I don't, everything works as expected. Deep Links work regardless of whether the app is running or not, and they always return the most recent Referral Parameters through public InitSessionBuilder withCallback(BranchReferralInitListener callback).

Unfortunately, we are legally not able to leave user tracking enabled. And Branch.io is already deeply integrated with other products, so replacing it is not an option either.

Tested on the most recent BranchSDK 5.8.2, using Sony Xperia 1 IV (Android 14), Google Pixel 6a (Android 13)

0

There are 0 best solutions below