Created
May 29, 2019 02:40
-
-
Save jakejrichards/95803b91155eb7a819985230bf69ee10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactGA from 'react-ga'; | |
import auth from './auth.ts'; // Sample authentication provider | |
const trackingId = "UA-1234567890-1"; // Replace with your Google Analytics tracking ID | |
ReactGA.initialize(trackingId); | |
ReactGA.set({ | |
userId: auth.currentUserId(), | |
// any data that is relevant to the user session | |
// that you would like to track with google analytics | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment