Skip to content

Instantly share code, notes, and snippets.

@maxencehenneron
Created January 3, 2023 01:07
Show Gist options
  • Save maxencehenneron/bb0be0b04a6571cbc4a21a3b33e23a58 to your computer and use it in GitHub Desktop.
Save maxencehenneron/bb0be0b04a6571cbc4a21a3b33e23a58 to your computer and use it in GitHub Desktop.
import { firebase } from '@react-native-firebase/analytics';
export default {
logEvent: (
name: string,
params?: { [key: string]: any },
): Promise<void> => firebase.analytics().logEvent(name, params),
};
import { getAnalytics, logEvent } from 'firebase/analytics';
import { initializeApp } from 'firebase/app';
import firebaseConfig from '../../constants/firebase-web';
const firebase = initializeApp(firebaseConfig);
const analytics = getAnalytics(firebase);
export default {
logEvent: (
name: string,
params?: { [key: string]: any },
) => {
logEvent(analytics, name, params);
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment