BranchMetrics / unity-branch-deep-linking-attribution

The Branch Unity SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/unity/
MIT License
118 stars 24 forks source link

Url generated with Branch.getShortUrl only works for first user who clicks it #219

Open mikhailb1990 opened 2 months ago

mikhailb1990 commented 2 months ago

Describe the bug

I am using the Branch UnitySDK release 2.0.0 with Unity 2021.3.5. I create Branch share links via Branch.getShortUrl and then using the NativeShare unity plugin to allow users to share the link. I add "referrer_id" as custom metadata. Now when User A shares the link with 2 users, User B and User C, if User B clicks the link first, installs the app and opens it, they receive the deep link data correctly. However, after that, User C clicks the link, installs the app, but on opening it no deep link data is received even on first app open. In fact the initSession callback doesn't even get called.

Steps to reproduce

  1. Generate a url with custom metadata using getShortUrl
  2. Share the url with multiple people
  3. Get one person to click the link and install the app and open it and log the received metadata in the initSession callback
  4. Get another person to click the same link, install the app and try to check logs - no log will be displayed

Expected behavior

I expected the link would provide the correct metadata to all users who received and clicked on it and installed the app

SDK Version

2.0.0

Unity Version

2021.3.5

Make and Model

iPhone 15

OS

iOS 17.5.1

Additional Information/Context

No response