Google Analytics Tutorial: Integration of React Native Apps


By CTCDC.in | Saturday, July 20, 2019

SEO Analytics and Reporting

Intermediate

Alarmed by the name, huh? You should be because this blog focuses completely on technicality of Google Analytics. Through this tutorial you’ll learn how to use Google Analytics to analyze data for react native apps. Obviously, doing this will require a foreknowledge of Google Analytics and Android Studio for app creation. Since, we’ll be working on react native apps, it is recommended that you have at least some knowledge of what they are. React native is a JavaScript structure that provides renditioning of real and native apps for mobile phones (both Android and iOS). These will be the main catalyst in the integration.

  1. 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.

    firebase-analytics


    1. 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:

      react-native-firebase


      Easy right?
    2. Now, you need to get your tracking code.

      google-analytics-for-mobile-apps


      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.
    3. 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.

  2. 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.

    react-native-google-analytics-bridge


    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.

  3. 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.

  4. 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.

Share with:  
        

Write Your Valuable Opinion

Ready to make your career in Digital Marketing!

CTCDC give you an edge on Internet marketing, Be a pro in Brand awareness, leads generation and online sale.

Request for CallBack Get Curriculum

Our Placement Partners