When you partner with Adswerve, you get exclusive access to Adswerve Connect, your central hub for everything you need to succeed. As an Adswerve client, you will have immediate access to hundreds of training videos to deepen your expertise, the latest industry news and insights, all of your account and billing information and proprietary tools and applications designed to help you get more done.
Subscribe to our monthly newsletter to get the latest updates in your inbox
It's possible to use React Native and install Firebase GTM. This is great because no documentation on this topic exists at the moment. Below is a summary. Our goal is to provide a bit of structure around installation because we're combining several different technologies and, therefore, it's easy to become disorganized.
Step 1: Install Firebase
To accomplish this, we'll use the below integration. This integration allows us to use JavaScript to make analytic calls instead of having to write native code twice.
You'll need to install an individual container for both iOS and Android. We'll need to access the native level of the React Native app. Because this part is native, it's identical to the standard Firebase GTM installation.
Create GTM Container and download default container.
Place default container into a created 'containers' folder.
app/main/assets/containers
Note: This has to be an actual folder with the exact name—otherwise GTM will not be installed correctly.
Step 3: Add Analytics Code
We can now add JavaScript code to our React Native app that will send data to Firebase GTM. We do this by calling the below object:
firebase.analytics()
We can send data to Firebase GTM with the below:
firebase.analytics().
logEvent('eventName', {'event':'parameters'});
Here's the
reference for more info.
This information is sent to Firebase GTM and, therefore, Firebase Analytics automatically. We should see this information in the Firebase Analytics StreamView. Once we have Google Analytics tags setup in Firebase GTM, we should see this information appear in Google Analytics Real-Time reports as well.
Our media geniuses, analytics savants and industry-leading data scientists have deep expertise and a passion for helping our clients use it effectively. And they'd love to help you achieve your marketing goals.