Closed andaralex closed 2 years ago
593 (Using multiple trackers in iOS ) is just implemented as set a new tracker; but the idea is to have multiple trackers at the same time, don't you agree?
Correct, it just set the new tracker instance as default tracker.
Yes, in some rare use-cases, developer might needs to use multiple trackers in single application.
Also, by default Google Analytics supports multiple trackers (Ref: https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_with_multiple_trackers), so in some cases developer might expect this feature in our plugin too.
could you please update the DOCs: with some javascript example code
Already I have mentioned the sample code for Ionic Native Usage in commented line. FYI., Working with multiple trackers
this.ga.startTrackerWithId('YOUR_TRACKER_ID_1')
.then(() => {
// Send a screen view to the first property.
this.ga.trackView('First Tracker');
})
.catch(e => console.log('Error starting GoogleAnalytics', e));
this.ga2.startTrackerWithId('YOUR_TRACKER_ID_2')
.then(() => {
// Send another screen view to the second property.
this.ga2.trackView('Second Tracker');
})
.catch(e => console.log('Error starting GoogleAnalytics', e));
I meant the readme file
Updated the readme file and raised PR. Please check. @victorsosa
fixes for the closed issues - 593 (Using multiple trackers in iOS ) & 595 (updated GoogleAnalytics pod spec version to support iOS architecture arm64)