Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setBranchViewData only works once #846

Open
Ryanjso opened this issue Dec 10, 2022 · 2 comments
Open

setBranchViewData only works once #846

Ryanjso opened this issue Dec 10, 2022 · 2 comments

Comments

@Ryanjso
Copy link

Ryanjso commented Dec 10, 2022

Describe the bug

I'm having a bug setting data on a branch journey. The setBranchViewData appears to only actually set the data the first time it is called.

Steps to reproduce

  1. When a user navigated to a different page (react navigation) I call
console.log('I get called every time the page changes, confirmed')
branch.setBranchViewData({
            data: {
                $deeplink_path: deeplinkPath,
            },
        })
  1. when someone clicks the CTA in the journey, I read the journey_link_data and the $deeplink_path is always the first one I set, and this is apparent when it opens my iOS app and sends me to the first page I had set in the web app.

Expected Behavior

The branch journey data should be updated every time I call setBranchViewData.

Additional Information/Context

No response

SDK version used (window.branch.sdk)

^2.71.0

Environment

chrome ios

@Ryanjso
Copy link
Author

Ryanjso commented Dec 10, 2022

I ended up finding this from 4 years ago that explains journeys need to be closed and reopened to change the data. This could be documented better in the branch docs. It also is kinda awkward, as it goes away and comes back on every page change.

@rr-mostafa-darehzereshki

+1 for what Ryanjso mentioned. This is something we actively use to update the branch links with some dynamic data that can change over the same session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants