Issues with Messenger and branch links
If i share a Branch-link from a facebook post to someone on messenger, facebook seems to create their own link where they send the user directly to the App Store instead of opening the link in a browser.
This does not generate a Click since its bypassing the branch-page..
Is there a solution to this?
Thanks for pointing this out. We have been able to reproduce this behavior and are working hard to figure out exactly what’s going on. Unfortunately, if Facebook is tampering with Branch links, there likely isn’t much we can do. However, I will keep you posted on what we find, and if there is a solution, how you can implement it.
If you find anything else, let us know!
This was a messy one to track down, as there were a lot of things to test, and no easy way to do so. I appreciated your patience as we worked through this.
When you click on a link from Facebook,due to Facebook’s link wrapping behaviors, you may not actually be clicking on the original link. A good basic rule of thumb for this is that if you see a “card” in your newsfeed, or a “bubble” in messenger, then you are not clicking on the original link. Facebook wraps links like so: https://l.facebook.com/l.php?u=https%3A%2F%2Fbranchmaps.app.link%2F8hfp90FB5w&h=mAQEgcGVl&s=1
The important thing to see in that link is the “&s=1” query parameter. When you share a link on Facebook, their bot rides the redirects to the final URL. In most cases, this does not cause a problem. However, if the bot lands on an appstore pages, then Facebook will set “s=1” on their link. This query parameter tells messenger to send you directly to the Appstore url, instead of triggering the Branch link. Unfortunatly, there is no way to directly set, or stop Facebook from setting this paramter. If, however, you can convince Facebook’s bot that the final URL is not an AppStore page, you can circumvent this behvaior.
After several hours of hair-pulling and debugging, I’ve found a working solution to this issue:
- On an iOS device, navigate to your app on the AppStore
- Click the “Share” icon in the upper right hand corner of the screen
- Select “Copy Link”
- Navigate to the link settings tab of your dashboard (https://dashboard.branch.io/settings/link)
- Change your iOS setting from “Apple Store Search” to “Custom URL”
- Set the “Custom URL” field to the short-url you retreived in step 3 (Note: the url must be in format of https://appsto.re/xx/xxxx for this to work)
- Click “Save” at the bottom of the dashboard page
After following the above, please post a marketing link (that does not have $ios_url set) to Facebook. When the link has been posted, use the “Share” button to send the link via messenger. Upon clicking the “bubble” from messenger, you should see one of the following:
- If Deepviews are enabled: A webview opens and loads a Deepview. The user recieves a prompt to leave the messenger app. If yes, and the app is installed, the app is opened and the link params are passed. If the app is not installed, the user is left on the Deepview (functions as a normal Deepview).
- If Deepviews are disabled: A webview opens, a white page loads, and the user receives a prompt to leave the messenger app. If yes, the user is redirected to the AppStore.
Please note that this will not retroactivly affect links posted to Facebook, or those shared through messenger; only links posted to Facebook after enacting the fix will work.
The magic sauce here is the appsto.re/xx/xxxx link that Apple has provided us. That short link helps “block” Facebook’s crawler, so it doesn’t automatically send your user to the AppStore.
Let me know if this helps solve you issues, and please don’t hesitate to contact us again if you have any issues.
Wow, quite a headache for you guys.. Thanks alot! Have done some testing, and it seem to have solved the issue.
A couple of days ago the appsto.re links didnt seem to work at all, maybe some issue att apples end. Today they work just fine!
Thanks again! Will be back if we find any issues.