Google Analytics Tutorial: Integration of React Native Apps
By CTCDC.in | Saturday, July 20, 2019
SEO Analytics and Reporting
Creating Google Analytics Account
We’ll start by creating a new Google Analytics Account, if you already have an existing account, then you can skip to the second point. You need to visit the Google Analytics login page and start working by creating an account or just by signing in to an already existing account. After signing in you’ll be shown three steps you fulfill in order to set up a Google Analytics account.
After signing up, you need to fill in all the necessary details about your online business. You’ll be asked to fill the following information:
Now, you need to get your tracking code.
Just click on the “Get Tracking ID” button upon which you’ll receive a code. This tracking code needs to be installed on every web page of your website through the language you used for writing the web pages. But we won’t be needing this because we’re working on react native apps.
You don’t need to perform this step. But if you are willing to know more about it, then click here. Practically, now you’re ready to add analytics to react native apps.
Further Working On Existing Google Analytics Account
You need to a new create property on your Google Analytics account. For this, go click on the Admin menu at the bottom left and choose create property on the property column.
After that, we’ll have to choose between either mobile apps or websites. We’ll recommend choosing a website, because then you can skip an additional step of creating a Firebase app as Google Analytics asks for Firebase app requirements to fulfill this step. Don’t worry, you won’t face any problem for choosing this step. But if you already have a Firebase app, then opt for mobile apps option.
Now, you’ll have to fill the required information of your react native app. After fulfilling this step, you need to create a new view by clicking on the Admin menu. Now, click on Create View on the third column and select Mobile app and enter your app details.
Create An App On Segment or Start Working On An Already Existing One.
If you are interested in creating an app on segment, then you’ll gain some useful information on CTCDC official. Since, creating a mobile app is an onerous task and also a time-consuming one, we’ll for now, work on an existing app. Creating a mobile application can be crucial to one's business or career crust, as it helps your website gain traffic too.
Adding Tracking Code
It is now time to add tracking code to your app. The best method of doing this is to follow the given instructions. You need to download and install the Android/iOS SDK and Play Services SDK. Create an Admob account and then link it to Google Analytics. Now, you need to set up tracking ID by linking to an existing account. And you are done!
Now you can inspect the data of your react native app.