Setup Google Analytics to track your React.js website within minutes.

Lawrence Tan
Google Cloud - Community
3 min readAug 12, 2018

--

For simplicity of this tutorial, I will pick up where I left in my last tutorial where we created a React-app call go-go-cloud and hosted it on Google Cloud. Here, we will be looking at how to integrate analytics from Google using an open source library from Github call React-GA.

Firstly, head over to our Google Analytics Dashboard to do some setup. Go to the Admin Tab and click Create Account.

Fill in the respective fields, depending on the app you created in the previously tutorial, or any website you are intending to track, just paste the appropriate URL here.

Then you should be brought to Tracking-Code page where you will be shown whats your unique tracking code (i.e. UA-123456789–1)

--

--

Lawrence Tan
Google Cloud - Community

Googler. Loves God, Loves my wife, Loves my Family & Corgis.