Closed youssmak closed 7 years ago
Hi @petarov :)
If there is a way to support this without requiring existing users to change the way they currently call the plugin then I am all for it. If you want to look in to this that would be great. Let me know if there is anything I can help with. Here is some android sdk code using multiple trackers: https://developers.google.com/analytics/devguides/collection/android/v4/advanced
Also if you do find a way to integrate this functionality, I think the next release should increment the major version. This can be a 1.0.0 release because things have been fairly stable for a while and since the switch to npm a while back some plugin finding sites view plugins that are not >1.0.0 as unstable which may alter potential users opinion of the plugin when evaluating analytics plugins. I can do the release if needed when the time comes. I greatly appreciate all of your help.
Thanks! -Craig
@cmackay Awesome! :) Also, great point about the versioning.
I think the first step towards this is to just enhance the setTracking
method to support multiple tracking ids and also adapt the iOS and Android code to support that.
A more enhanced variant is to be able to set logging, metrics, etc. per tracker, but I see this as something that may be done in the future as part of a more complex API refactoring.
@petarov sounds like a good plan :) Let me know if I can be of any help. Thanks!
I'm also looking into that, although I'm not sure what is the best way to add this functionality.
@cmackay Have you done any research on that? Maybe I can take a look. Google's docs say one should need multiple Tracker objects.