Firebase

How to integrate Firebase Analytics with Google Tag Manager?

Discover how to effortlessly blend Firebase Analytics with Google Tag Manager for enhanced app tracking and reporting. Follow our detailed, easy-to-understand guide.

Developer profile skeleton
a developer thinking

Overview

Joining Firebase Analytics with Google Tag Manager (GTM) merges user-friendly app analytics with the powerful features of tag management, paving the way for smoother tracking and reporting. This setup involves several stages, like creating a Firebase project, setting up GTM for your app, and ensuring correct tagging of events and user properties. Together, these tools give marketers and developers the ability to manage and tweak analytics and marketing tags without needing to update the app's code. This boosts efficiency and brings flexibility in handling app data.

Get a Free No-Code Consultation
Meet with Will, CEO at Bootstrapped to get a Free No-Code Consultation
Book a Call
Will Hawkins
CEO at Bootstrapped

How to integrate Firebase Analytics with Google Tag Manager?

Step 1: Set Up Firebase Project

Head over to the Firebase console, and either start a new project or pick one you already have. Follow the steps to get your Firebase project all set up.

Step 2: Add Firebase SDK to Application

Time to add the Firebase SDK to your app:

  • For Android: Pop the Firebase SDK into your build.gradle file.
  • For iOS: Use CocoaPods to install the Firebase SDK by adding pod 'Firebase/Analytics' to your Podfile.

Step 3: Enable Google Analytics

In the Firebase console, turn on Google Analytics for your project. Just head to the Analytics section and flip the switch to enable Google Analytics.

Step 4: Link Firebase to Google Tag Manager

Inside the Firebase console:

  1. Go to Project Settings.
  2. Click on the "Integrations" tab.
  3. Find Google Tag Manager and click to link your accounts.

Step 5: Set Up Google Tag Manager

Hop into Google Tag Manager (GTM) and create a new container for your app.

  • For Android: Pick the "Android" platform.
  • For iOS: Pick the "iOS" platform.

Step 6: Add the GTM SDK to Your Project

Add the Google Tag Manager SDK to your app:

  • For Android: Add the GTM dependencies to your build.gradle file.
  • For iOS: Add pod 'GoogleTagManager' to your Podfile and run pod install.

Step 7: Initialize GTM in Your Application

Get Google Tag Manager up and running in your app's code:

  • For Android: Add the initialization code in the onCreate method of your Application class.
  • For iOS: Initialize GTM in the AppDelegate class.

Step 8: Create Tags, Triggers, and Variables in GTM

In Google Tag Manager:

  1. Create Tags to define what data you want to send to Firebase Analytics.
  2. Create Triggers that define when and where the tags should be fired.
  3. Set up Variables to hold values you want to send (e.g., event parameters, Firebase user properties).

Step 9: Publish the Container

After setting up the tags, triggers, and variables:

  1. Submit your changes in Google Tag Manager.
  2. Publish the container to make it live.

Step 10: Test and Validate

Use the debugging and testing tools from both Firebase and Google Tag Manager to make sure data is being correctly sent from your app to Firebase Analytics via GTM. Check logs and Firebase DebugView for validation.

Explore more Firebase tutorials

Complete Guide to Firebase: Tutorials, Tips, and Best Practices

Explore our Firebase tutorials directory - an essential resource for learning how to create, deploy and manage robust server-side applications with ease and efficiency.

Why are companies choosing Bootstrapped?

40-60%

Faster with no-code

Nocode tools allow us to develop and deploy your new application 40-60% faster than regular app development methods.

90 days

From idea to MVP

Save time, money, and energy with an optimized hiring process. Access a pool of experts who are sourced, vetted, and matched to meet your precise requirements.

1 283 apps

built by our developers

With the Bootstrapped platform, managing projects and developers has never been easier.

hero graphic

Our capabilities

Bootstrapped offers a comprehensive suite of capabilities tailored for startups. Our expertise spans web and mobile app development, utilizing the latest technologies to ensure high performance and scalability. The team excels in creating intuitive user interfaces and seamless user experiences. We employ agile methodologies for flexible and efficient project management, ensuring timely delivery and adaptability to changing requirements. Additionally, Bootstrapped provides continuous support and maintenance, helping startups grow and evolve their digital products. Our services are designed to be affordable and high-quality, making them an ideal partner for new ventures.

Engineered for you

1

Fast Development: Bootstrapped specializes in helping startup founders build web and mobile apps quickly, ensuring a fast go-to-market strategy.

2

Tailored Solutions: The company offers customized app development, adapting to specific business needs and goals, which ensures your app stands out in the competitive market.

3

Expert Team: With a team of experienced developers and designers, Bootstrapped ensures high-quality, reliable, and scalable app solutions.

4

Affordable Pricing: Ideal for startups, Bootstrapped offers cost-effective development services without compromising on quality.

5

Supportive Partnership: Beyond development, Bootstrapped provides ongoing support and consultation, fostering long-term success for your startup.

6

Agile Methodology: Utilizing agile development practices, Bootstrapped ensures flexibility, iterative progress, and swift adaptation to changes, enhancing project success.

Yes, if you can dream it, we can build it.