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

Releases: idehub/react-native-google-analytics-bridge

Major release because of breaking RN v0.40

14 Jan 10:09
Compare
Choose a tag to compare

This is a small major release which only supports RN v0.40.0 and up.

It is because of a breaking change introduced in RN v0.40.0, in which they've moved the iOS native headers.

Multiple tracker support + much more!

05 Nov 14:46
79897a6
Compare
Choose a tag to compare

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!

Datalayer push ability + track multiple products

04 Sep 15:19
Compare
Choose a tag to compare

Now you have the ability to push to the datalayer with GTM with pushDataLayerEvent(dictionary = {}). Thanks to @rdesai40!

We also have the ability to track multiple products with ecommerce on GA: trackMultiProductsPurchaseEvent(products, transaction, eventCategory, eventAction). Thanks to @crnbtn for implementing that!

Thanks to @dmueller39, @wilsonpage & @iotashan for other fixes as well!

Update Android dependency + setAppVersion

27 Jul 09:03
Compare
Choose a tag to compare

This release is tagged as a major release, since the GA Android dependency has had a major release.
It is now 9.+, remember to update your SDKs in the Android SDK Manager!

Thanks to @AndreyNikiforov we now also have a setAppVersion(appVersion) method. Thanks for your contribution!

Config appName and tracking custom dimension values

21 May 14:20
Compare
Choose a tag to compare

Three new functions available on the GoogleAnalytics type!

You now have the ability to explicitly set the appName. This is done by calling setAppName(appName).
Thanks to @alpacaaa for the implementation! 🎆

Next up is the ability to track custom dimension values. Since this needs to be done along with tracking a screenView or event, there are now two new methods for this:

  • trackScreenViewWithCustomDimensionValues(screenName, dimensionIndexValueDict)
  • trackEventWithCustomDimensionValues(category, action, optionalValues, dimensionIndexValueDict)

Thanks to @peteclark3 for fixing that for us! 🍰

Google Tag Manager and A/B-testing

24 Apr 11:41
Compare
Choose a tag to compare

Tag Manager

This release includes a Google Tag Manager implementation, which allows you to pull values out of your containers. The API is simple:

  • openContainerWithId(containerId)
  • stringForKey(key)
  • boolForKey(key)
  • doubleForKey(key)

All these returns a Promise.

A/B-testing

The motivation behind this release was to enable simple A/B-testing, consult this section in the readme.

Breaking changes:

The Tag Manager-implementation uses Promise, which means that this release requires React Native 0.19+!

Thanks to @libinlu89 for helping me kickstart this!

Configure tracking code in JS

20 Mar 10:25
Compare
Choose a tag to compare

We have now added support for setting your tracker id in JS. Call the function once on app startup to set the tracker id for all subsequent static calls in the app.

const GoogleAnalytics = require('react-native-google-analytics-bridge');
GoogleAnalytics.setTrackerId('UA-12345-1')

A big thanks goes out to @sodik82 for his help and discussion in making this feature possible (and backwards-compatible!). As he said, the reasons for doing this is:

  1. Less manual steps during installation and each RN upgrade.
  2. Follow DRY principle - I have my tracking code in one place instead of two
  3. The less I mess with native code the better - for persons like me that are not familiar with native development :)

Happy tracking!

Added support for AnonymizeIP and OptOut

18 Mar 13:24
Compare
Choose a tag to compare

Thanks to @CeeEll for his PR providing this functionality!

Setting iOS logLevel

11 Mar 22:46
Compare
Choose a tag to compare

In order to control the logLevel you can add an item in your Info.plist with the key GAILogLevel. The value you use is a number which corresponds to your desired log-level:

  • 0: None
  • 1: Errors
  • 2: Warnings
  • 3: Info
  • 4: Verbose

Roadmap completion with simple configuration

29 Feb 18:56
Compare
Choose a tag to compare

With this release you are able to configure the tracker defaults like dispatch interval and tracking of uncaught exceptions.

Since this completes the current road map, I've decided to make this a major release.

The two methods are:

  • GoogleAnalytics.setDispatchInterval(30);
  • GoogleAnalytics.setTrackUncaughtExceptions(true);