React Native Google Analytics

Usage Instructions

  1. Sign up for Google Analytics if you haven't already, and create a new mobile property. Make a note of your property's tracking Id.

  2. Install the npm package, GoogleAnalyticsBridge, in your project.

  3. For each mobile platform (Android or iOS), you need to follow its corresponding manual installation for GoogleAnalyticsBridge usage.

  4. Import the target, then provide it when creating the middleware:

    import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge';
    import { GoogleAnalytics } from 'redux-beacon/targets/react-native';
    
    const target = GoogleAnalytics('UA-12345678-1', GoogleAnalyticsTracker);
    const analyticsMiddleware = createMiddleware(eventsMap, target);
    

Example