Detecting Installation Source with react-native-fbsdk - react-native

I'm facing a problem with react-native-fbsdk. I'd like to know whether the user has installed the app by coming through Facebook Ads or has he/she installed it organically from store (App Store, Play Store). Is this even possible with React Native?
The reason is, I need to log events for analytics restricted only on installations done via Facebook. There are pre-defined events, like App Installs and App Launches tracked, but my events are custom events.
I have assumption that either AccessToken.getCurrentAccessToken() or AppEventsLogger.getUserID() would return something when the installation is performed through FB. On dev environment, both returns null which is kind of expected. However these ideas could only be tested on production and this isn't an option.
So the actual question is: "How do I detect whether the user is coming through Facebook advertisement link?"

Related

React Native send email with link to web app or mobile app

I am trying to implement deep linking into this app. The app is a React Native Expo app, and is served on web, iOS and Android. There are a bunch of things we want to achieve with this i.e. link to specific things in the app such as certain messages etc. But currently my primary focus is just to navigate to general screens like 'Home', 'Messages', 'Login' etc.
I have been testing and so far, I can enter the URIs such as exp://host:port/--/login and they work as expected.
However, I know and understand that this will not work in a web browser on my laptop for example.
So my question is, how do I send an email to a user let's say after they have verified their account, prompting them to login, with a link that will for one, take them to the web app if they are on desktop, and two open the mobile app if they have it installed on their phone?
And just as an example, let's imagine my deep link URI is myapp://login
Thanks for any help.
EDIT
After looking around some more, I am deciding to consider the possibility of linking to the web app, and upon the web app loading, linking to the mobile app if they have it installed.
Given this, what is the best way to handle this?
You can follow one of the next approaches.
Validate the request origin and based on that generate the link for
an specific platform.
Generate as much links as platform are currently serving you app.
Like: Link to iOS, Link to Android and Link To web
You can design image buttons for each one to make it prettier

Firebase Dynamic Links looses UTM parameters

we have successfully implemented dynamic links natively on iOS, but we loose our UTM parameters, when the User installs his App via AppStore.
Details:
In case a user has not installed the targeted App, then the user will be redirected to the AppStore after tabbing on the dynamic link. After installing the app and open it, the UTM parameters are not being sent to Google Analytics.
I assume these UTM parameters get lost during the AppStore redirect, as this Issue does not reproduce for users, who have already installed the App. Also for Android, we could not reproduce this.
Any hints on that? Thanks!

Firebase Dynamic Links MinimumVersion behavior

I'm creating Firebase Dynamic Links programmatically in an Android and iOS apps.
Both apps are already available in Google Play and the App Store, so I want to use MinimumVersion to redirect users to the appropriate store if they are using previous versions.
The iOS parameters documentation states:
The version number of the minimum version of your app that can open the link. This flag is passed to your app when it is opened, and your app must decide what to do with it.
So if I understand it correctly, previous version would not be able to use it, as the code to decide what to do with it, doesn't exist in the current iOS version?
The Android parameters documentation states:
The versionCode of the minimum version of your app that can open the link. If the installed app is an older version, the user is taken to the Play Store to upgrade the app.
But when I try it, the Android device still suggests the current app to handle the intent, and doesn't redirect the user to upgrade it.
When I choose the app it opens it instead of redirecting.
What can cause this behavior?
Am I missing something in my understanding of how Firebase Dynamic Links suppose to work?

Branch.io smart banner how detect open or download app

I'd like to use branch smart banner because it can open app if it was installed. But i've understood how it work. I need install ios sdk in my app and use setIdentity?
Alex from Branch.io here: the smart banner actually doesn't require the SDK to be integrated. setIdentity is a completely separate method used for tracking individual users, and isn't used at all for the smart banner.
However, integrating the SDK is definitely the easiest way to get things working, because even without it you would still need to set up a Branch account, configure all your link routing rules in the Branch dashboard, and then enable Universal Links in your app (if it's iOS). Since that is 90% of the SDK set up process, you might as well do the whole thing so you can also take advantage of things like install attribution and analytics!

Using Branch links to deeplink to unpublished app

I'm working as a web developer for a start-up that has a andriod app prototype. I'm not an app developer ( still learning) so I'm a little unsure how to approach this.
I wanted to deeplink the app to the webpage. I came across this solution called Branch.io . It looks like exactly what we need but I'm not sure how to link it with an unpublished app. Maybe I'm missing something. Any advice would be greatly appreciated.
The Branch service actually doesn't depend on the App or Play Store at all. The link will first try to open up the app, but fallback to the store pages if not installed. You can override this fallback to any website, and the links will still function as usual.
To test an app not in the Play Store, first choose 'Custom URL' in the Link Settings dashboard, and fill in the page you'd like to send users when the app is not installed. It's common for people to send users to either their home page or TestFlight app.
Then, to test the deep linking through install and download tracking, just do the following:
Create a Branch link
Click it on your phone or on simulator and wait to be redirected
Run the app from Android Studio/Eclipse
Here are some more testing considerations. Happy linking.