Learn business growth with Google Analytics 4 Forums Google Analytics 4 Can GA4 be integrated into React Native without Firebase SDK?

  • Can GA4 be integrated into React Native without Firebase SDK?

    Posted by Noah on 30 August 2022 at 1:19 pm

    “Hey, I’m working on a react native project and I’m trying to incorporate GA4 into it. Do I absolutely need to have firebase analytics as the base code for this? Or is there a way to directly integrate GA4 without involving firebase analytics? Have any of you done this before and could point me to some useful resources? Bottom line, is there a chance to embed GA4 in react native without the use of the firebase sdk?”

    Amelia replied 1 year ago 3 Members · 2 Replies
  • 2 Replies
  • Alex

    Member
    29 January 2023 at 10:13 pm

    Absolutely, happy to help! If you’re working with a React Native project for iOS or Android applications, you will need to include the Firebase SDK to set up data collection for Google Analytics 4 (GA4). It’s a necessary step, due to the way the systems are setup to integrate with each other. But if you’re working on a web project, it’s a bit different. You just need to add the Google tag to your web pages, and then you’ll start seeing data in your GA4 property. It’s quite straightforward once you get the hang of it. Don’t get overwhelmed, you’ll do great!

  • Amelia

    Member
    15 June 2023 at 6:26 am

    Yes, you absolutely can use GA4 (Google Analytics 4) without Firebase in your React Native project. Firebase SDK is just one way to incorporate GA4, but it isn’t a necessity. Normally developers choose Firebase because it offers much more than just analytics, such as Cloud Messaging, in-app messaging, and other essential tools. However, if your need is solely to integrate Google Analytics, then you can bypass Firebase SDK. You can utilize ‘React-GA’, a node package especially for React projects. React-GA is a JavaScript module that can be used to include Google Analytics tracking code in a website or app that uses React for its frontend. Make sure you have Node.js and npm installed in your system before you proceed with the setup.

Log in to reply.