Reputation: 13514
Consider an URL -
example.com/page
which is generated from marketing tab in Branch dashboard.
Now I use this URL to open my iOS application and also have redirect urls for desktop and Android. I append query params to my deep linked URL as below.
example.com/page?currentPage="myPage"
In my application, in branch init session I am able to get the parameters which I added manually.
Now, how can I achieve the same for redirect URL? If I add query params to Branch link then it should be passed on to my redirect URL without any SDK of Branch installed.
It should redirect to URL like below:
mydomain.com/page?currentPage="myPage"
Upvotes: 1
Views: 4450
Reputation: 1054
You indicate that when you append link parameters to your Branch links and then use those links to open your iOS app, you are able to retrieve the appended parameters from the Branch SDK. Your question, if I am understanding correctly, is how to pass such query parameters to the websites that you are redirecting to when users click on Branch links from non-iOS devices.
When a Branch link is tapped and the user redirected to URLs that you have specified to be the app's (or the link's) "Android URL" or "Desktop URL," Branch will automatically append any parameters that were appended to that link.
For example, the Branch link https://ogt1.app.link/KZGUqrzBdB redirects users on Android devices and Desktops to "http://www.bing.com/search". Appending the query parameter "q=branch+metrics" to the Branch link produces the link "https://ogt1.app.link/KZGUqrzBdB?q=branch+metrics", which will automatically redirect Android and Desktop users to "http://www.bing.com/search?q=branch+metrics".
When the page you redirect to opens, you can retrieve any appended parameters in many ways. Two of the most straightforward approaches are:
If I have misunderstood what you are asking please provide more detail. Examples and a test plan would be most helpful.
Upvotes: 2
Reputation: 13613
Alex from Branch.io here:
This is the default behavior for Branch URL redirects. Query parameters appended to the link are passed through verbatim.
This means if your link is http://example.com/page
and it is set to redirect to http://otherdomain.com/page
when the app is not installed, you can append ?currentPage="myPage"
to make the final URL http://otherdomain.com/page?currentPage="myPage"
Hope that helps!
Upvotes: 2