arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1.01k stars 1.56k forks source link

Tracking Install Referrer #809

Open mategvo opened 6 years ago

mategvo commented 6 years ago

I cannot find any information about install referrer. How can I track it?

briantq commented 6 years ago

I am going to argue this should not be part of the this plugin. The Install Referrer is not part of Firebase. In fact, it requires simply an Android dependency.

Firebase itself is a large set of functionality and if we try to take on even more scope this plugin could become more of a maintenance nightmare. Additionally, it could interfere with other users who have implemented it using recommended routes, like using this plugin https://github.com/vijayrajasekaran/cordova-plugin-referrer (found via a stack overflow answer).

@mateuszgwozdz @guylando I'll leave it open for additional discussion. Please let me know why you think it should be part of this plugin

soumak77 commented 6 years ago

Agreed. Non firebase features should not be part of this plugin. In my opionion, plugins should be as small as possible. This plugin is already too big. Ideally we would have one plugin per firebase feature so that users can pick and choose what features they want in their app instead of forcing users to enable all features even if their app doesn't use them.

On Tue, Sep 18, 2018, 8:15 AM Brian Bauman notifications@github.com wrote:

I am going to argue this should not be part of the this plugin. The Install Referrer is not part of Firebase. In fact, it requires simply an Android dependency.

Firebase itself is a large set of functionality and if we try to take on even more scope this plugin could become more of a maintenance nightmare. Additionally, it could interfere with other users who have implemented it using recommended routes, like using this plugin https://github.com/vijayrajasekaran/cordova-plugin-referrer (found via a stack overflow answer).

@mateuszgwozdz https://github.com/mateuszgwozdz @guylando https://github.com/guylando I'll leave it open for additional discussion. Please let me know why you think it should be part of this plugin

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arnesson/cordova-plugin-firebase/issues/809#issuecomment-422434552, or mute the thread https://github.com/notifications/unsubscribe-auth/AKZWK9H7tijfxGhFqQuirAOYlNLXoPfkks5ucQ4tgaJpZM4WLwuL .

guylando commented 6 years ago

I would expect this plugin to expose all firebase abilities. Since firebase tracks install and uninstall events, I would guess it would have the ability to get the install referrer in a cross platform way as an alternative to appsflyer.

briantq commented 5 years ago

@guylando you are correct, this plugin is intended to expose Firebase APIs. From what I found, the Install Referrer functionality comes from Google Play Services, https://developer.android.com/google/play/installreferrer/library.

Are we talking about something different?

guylando commented 5 years ago

@briantq

  1. Well, underneath probably firebase itself uses some of google play services too but exposes it in cross platform way supporting ios too.
  2. The link indeed speaks about the most low level way of getting the install referrer on android devices. For example appsflyer gets it this way or another way on both android and iphone devices.
  3. The question is if firebase has some functionality related to this. As you can see here: https://support.google.com/firebase/answer/6317485?hl=en firebase DOES already integrate with the relevant event of first_open. So it means firebase already has a cross platform way of getting the first_open event, so I would expect the install referrer to be part of it.
briantq commented 5 years ago

@guylando Thanks for the article link. My interpretation is that Firebase internally processes different events based on "As long as you use the Firebase SDK, you don't need to write any additional code to collect these events".

Additionally, looking at the Firebase Documentation, you can find information on setting/adding events, but as far as I can tell there is no API to retrieve event information. Please let me know if you see something else.

So, if you can achieve a solution to get the install referrer without hacking Firebase or adding additional plugin dependencies (like Google Play Services), I think that would make a good candidate. Does that make sense?

kaoecoito commented 5 years ago

To implement the install referrer trace I used firebase dynamic links, which I saw is the simplest and most efficient way to implement. Since this plugin does not support this feature I used the firebase-dynamic-links plugin, however I had to make a fork and modify some things in the plugin because it conflicts with this firebase plugin, and I need both in my application. I understand the comment about having separate plugins for each functionality of the firebase but I see the plugins in the cordova generate a lot of conflict, especially when using google services. I believe it is more functional to have all the functions of the firebase in a single plugin to avoid the conflicts, since in general one does not use only isolated firebase functionality. The other option is to create some basic firebase deployments project to later have individual, non-conflicting plugins.