sencrop / capacitor-firebase-dynamic-links

Firebase Dynamic Link Capacitor Plugin
0 stars 3 forks source link

Questions about being confident of recognizing the initial user #6

Open sneko opened 2 years ago

sneko commented 2 years ago

Hi @Oupsla @piitaya ,

I'm interested by the "MatchType" variable in iOS to leverage the Firebase score if they are confident this is a user coming from the initial link or not: https://firebase.google.com/docs/reference/swift/firebasedynamiclinks/api/reference/Enums/DLMatchType

From what I understand it would allow me to know for iOS if the user clicking the dynamic link before installation is the same than after (can be useful for referral system and so on...). Do you plan to support this?

I guess on Android this score does not exist because Firebase is able to pass a parameter "referrer-id" to the store, that will be pass to the app at the end, so there is no doubt of the "uniqueness" (user at click, user at install). (ref: https://stackoverflow.com/questions/58790604/matchtype-in-android-firebase-dynamic-link-sdk)

Aside this, I try to figure out a case where Firebase does not document that much: I plan to integrate your plugin in my PWA app, and when on a browser on a mobile, dynamic link will work perfectly, except that when I'm in a desktop browser, the redirection is targeting the link, not the store (I thought at first Firebase would set the fallback automatically but it does not make sense if online version). In my case, I have a Smart App Banner to encourage the user installing the native app, so when on desktop browser I let the choice on it between Android and iOS installation, when the choice is made by the user I create the dynamic link with ofl parameter as the right store link (iOS/Android) so the user are redirected to it. At the end the user will know how to install the native app (moreover Google facilitates it from the browser since we see already linked devices), but I'm not sure after installation the user will be recognized based on IP... have you tried something similar? Or an advice?

Thank you,

sneko commented 2 years ago

Any thought/feedback @Oupsla @piitaya please?

Oupsla commented 2 years ago

Hello @sneko , Sorry for the huge delay of my answer, I totally forgot to answer you.

For our cases, determine the match type was not relevant cause it was just to personalize a register flow (so there is no so much "confident" data to show or not).

What I "understand" of this match type is that an user could click multiple times on a dynamic link (and multiple users could click on the same link or even an user could open the link on different devices) and so firebase need to determine if the link is a one-to-one correspondance (the link >< the device), and you could reveal more personal infos if the link is unique.

From stackoverflow I found this :

When your App first receiving the Dynamic Link the matchType will be default. (Exception here if copy unique match succeeded, then matchType will be unique.) All subsequent links will have matchType weak. Also if matchType have value none, this means match was not achieved.

If you need this from iOs, feel free to open a PR.

For your second question, I would not send the dynamic link (that redirect to the store) on desktop. I would rather only show your smart app banner when the user visit your website on mobile (but not in the native app), and on browser you could ask for the phone number of the user to send the dynamic link in a sms (so you are sure that the user is not on desktop).