Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to track the application in the console, where have to create the Google analytic account so see track the application. #27

Open
renishdeveloper opened this issue Nov 15, 2018 · 0 comments

Comments

@renishdeveloper
Copy link

I write the below code to track the application is this much is enough to track the application. And please guide for where to track the application.
import React, { Component, Platform } from 'react';
import { Text, View, StyleSheet } from 'react-native';

import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge';
import GoogleAnalytics from '@redux-beacon/react-native-google-analytics';

import { Analytics, PageHit, Event } from 'expo-analytics';

export default class App extends React.Component {

constructor(props) {
super(props);

}
render() {

const analytics = new Analytics('UA-XXXXXX-Y');

analytics.event(new Event('App testing..!', 123))
.then(() => console.warn("successful"))
.catch(e => console.warn(e.message));

return (
  <View style={styles.container}>
    <Text>Google Analytics in react native..!!!</Text>
  </View>
)

}
}
Hope for your answer.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant