Branch’s links work but not our customed links

Hi all,

We have ran into an interesting problem. For iOS, when we use the deepviews created through Branch dashboard (in the marketing section), then we could open the app through the link if a user has installed the app. But for our customed webpage, which integrates branch’s web SDK, then it is not working properly, which also jumps to the redirect page (app store in our case). I wonder what might be the reason of this?

Android does not have this problem when using the same page.

PalmDrive — Developer
Commented on July 6, 2016.


Could you provide the address of the custom webpage where the Branch web SDK is integrated?

Branch — Developer
Commented on July 6, 2016.

Thank you!

New Update: We tried Smart Banner, and it works perfectly. But if we use the js codes provided in the docs, it always redirects us

PalmDrive — Developer
Commented on July 6, 2016.

Aha~! We think the problem lies with using branch SDK with Google Analytics SDK.

Now we have several places which could trigger deepviewCta(), for some, we placed it in the callback of GA, and for others, it is NOT nested in a callback. If we put it in the callback of GA, then it never fires up, always taking us to the redirect page, otherwise, things work fine.

I wonder if there is any solution for this?

PalmDrive — Developer
1 Answer(s)
Answered on July 6, 2016.

Thanks for the additional detail. This is a really interesting situation! Here is what I suspect is happening:

The deepviewCta() function works on iOS 9+ by triggering an automatic redirect to a Universal Link URL (which opens the app) and then going to a fallback URL if that fails. But Apple is very specific about the situations in which a Universal Link is allowed to launch the app (including things like how long of a pause is allowed before redirection). Of course these restrictions are not public, so all we can do is guess. My suspicion is that putting the deepviewCta() function inside a GA callback is falling outside of Apple’s rules, so the app never opens and you are instead being sent to the fallback URL.

I can think of two options here:

  1. You can build some way to trigger the GA and Branch functions separately so that they don’t conflict with Apple’s requirements.
  2. We actually have a brand new, one-click integration with Google Analytics, which you can read about here and here. If you set that up, you’ll get all Branch-related events automatically instead of needing to manually collect link click data.

Hopefully that helps!

Branch — Developer