Create In-App Sharing and Referral Links

Share links from the app to drive installs and reward users for sharing. Branch allows you to connect the dots to see which users are referring other users, and which shared content is driving the highest number of installs and re-engagements.

Create a BranchUniversalObject (BUO)

BranchUniversalObjects represent a unique piece of content, such as an article, video, or item for sale. Full code snippets for setting them up can be found here: iOS, Android.

  • Set a unique canonicalIdentifier for each piece of content.
  • canonicalUrl should reflect the content’s web URL equivalent

Set the link’s properties

  • Set redirect url in $desktop_url (mobile users will be sent to the platform-specific app store)
  • Set feature = “referrals”
  • [Optional] Customize link appearance by setting OG tags, though they will default to tags found in the web page set in $desktop_url
  • [Optional] Set unique promo code in a key to reward the referred user

Next, be sure to set the user ID of the referring user in a key such as referringUserID. Then when a user clicks that link and opens the app, you can inspect referringUserID and connect the dots between referring and referred user. This is the fundamental piece required for you to measure which users are referring other users, and to reward them accordingly.

Create the Branch link

Lastly, create the shortened Branch link to be shared. Full code snippets on creating short links from Branch Universal Objects can be found here: iOS, Android.

Use webhooks to be notified when shares drive conversions

Customers with access to Branch's Data Feeds product can set up webhooks to be notified of installs and conversions in real time. Our webhook documentation can be found here.

  • Filter for INSTALL (or conversion) events attributed to a feature = “referrals”
  • The webhook can include the unique promo code and user ID (referringUserID) from the link you set up
  • After validating the promo code and referringUserID, you can reward the referring and/or referred user. You can manage credits in house or use a third-party system.

Did this page help you?