Member-only story

Google Analytics in React.js

Wendee ๐Ÿ’œ๐Ÿ•
5 min readDec 16, 2019

--

Abandoning our previous Google Analytics App + Web properties, this time we created a GA dashboard purely for web. (So we finally get a tracking id, which looks like UA-123456-78 ~) You can refer to this tutorial to learn how to get a Google Tracking id ๐Ÿ™ƒ

To implement tracking in our React.js project, we will use the package react-ga .

This article will cover the following topics:

  1. Analyzing user acquisition
  2. Tracking PageViews
  3. Tracking Events
  4. Tracking Load/Render Performance
  5. Tracking Exception

If you are new to Google Analytics, here are two helpful youtube links that will guide you through the dashboard:

Terms in GA

Session

Google analytics is session-based event tracking, so we may think a session as a period of user activities. A session starts when user enters our website. It ends under the following conditions:

  1. After 30 minutes of inactivity

--

--

Responses (2)