Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Multiple tracker support + much more!

Compare
Choose a tag to compare
@cbrevik cbrevik released this 05 Nov 14:46
· 114 commits to master since this release
79897a6

Okay this is a huge release. Thanks to the fantastic work by @MrBr, we now have support for multiple trackers! 🏆

From now on, you will have to construct the GoogleAnalyticsTracker class:

import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge';
let tracker = new GoogleAnalyticsTracker('UA-12345-1');

This means the old way of using the tracker statically, GoogleAnalytics.trackScreenView('Home'), is deprecated. It's not a breaking change yet, but I recommend updating your code since that will probably be removed in a later version. This also means that setting your trackerId natively in Info.plist etc is deprecated.

Things have also been moved around a bit, a few settings methods have been moved to the new GoogleAnalyticsSettings type. It is still used statically since settings are applied across all trackers.

Also since the previous release we now have trackMultiProductsPurchaseEventWithCustomDimensionValues added to the tracker, courtesy of @malaman. 💪 Thanks!