Campaign Attribution in Firebase Analytics for Tracking Mobile App

Firebase tool is like a dream come true for product managers owing to its smooth app development capabilities and the complimentary app analytics features for analysis & insights.

In my previous blog on Firebase analytics for mobile app I had shared a few tips on how to enhance Firebase analytics reporting, identified its limitations & later discover how swiftly we can overcome them.

One of the actionable items in that blog was to attain the General Campaign Attribution data for Android app users in Firebase Analytics Reporting and we are going to cover the same in detail in this blog post.

So what’s missing in Firebase Reporting?

Undoubtedly the analytics reporting aspect of Firebase covers a wide range of important events that add value to your business. But unfortunately, when it comes to the “Attribution” section of reporting, it has its limitations and what is missing is the following:

  • No custom campaign attribution is available for App Installs.
  • The re-engagement campaigns attribution data is missing.

Elaborating on the above problem statement, currently, Firebase Analytics tracks Attribution for a limited number of Advertisers listed here. For any other platform or source/medium apart from those, the data tracked will be attributed to “direct”, which is a major problem.

Workaround to Track Custom Campaigns

In this blog, I will walk you through a solution that is a workaround developed by our team at Tatvic and will enable you to track custom campaigns through deep links for re-engagement attribution. The solution offered here that for the second problem statement mentioned above.

Let’s get an understanding of how the Campaign Attribution in Firebase Analytics will be done:

1. Deep link with UTM tagging

A prerequisite to being able to track custom campaign data is that all the links through which the users land on your app should have proper UTM tagging to it. Below is a sample URL:

https://shop.tatvic.com/?utm_campaign=test_dynamic&utm_medium=internal_campaign&utm_source=tatvic


2. Fetching UTM parameters

When the user lands on the app through the link, we fetch the UTM parameters form the link.

The below code describes how to fetch the UTM parameters from a deep link in Android.  

Note: The above code is for Android only. For similar implementation in iOS, you can refer to the iOS document and get the UTM parameters.

Also, Read Firebase Analytics Reporting

3. Sending campaign data along with an event

Being aware of the fact that Firebase Analytics is event-based, the campaign attribution is viewed against the “first_open” event only in Attribution Report of Firebase.

And we have no control or access to this event(first_open) and when it is fired. Thus, we define or use alternative event and track the campaign parameters along with it.

In our solution, we will use the suggestive event of Firebase Analytics i.e. “app_open”.

FirebaseAnalytics.Event.APP_OPEN


4. Enabling event as attribution in Firebase Reports

Since we are now tracking the campaign data, it is necessary to view the same in the reporting section. However, to view the campaign data with events, your very first job is to

“mark the event as conversion in the event report”

After enabling the toggle button, very soon you will be able to see your attribution report getting populated with fine campaign data.

Note:

The attribution will be only done for the count of events, only after they have been marked as true for conversion in the Event Report.

Comprehensively with the above set of actions, you will be able to start tracking the custom campaign data for deeplinks or re-engagement campaign in Firebase Reporting successfully. The above approach tracks source/medium in Firebase, with a custom event (“app_open”) and not with the default attribution of the “first_open” event that we send.

Below is the glimpse of a report with custom campaign attribution data:

Conclusion

Although we have achieved tracking Custom Campaign Attribution for Re-engagement Campaigns, unfortunately, we still have no sight of Install Campaign data in Firebase Analytics.

Are we really losing hopes on Install Referrer Data in our Analytics Reports?

Absolutely not! We are not going to give up so soon.

We have an in-house solution for tracking Install’s Campaign data in Firebase. The solution that we offer is quite savvy, it allows you to track the Install Referrer data in both Firebase and Google Analytics Platform. But not limited to ourselves we can further track these Install Data in other Analytics platforms too. For further assistance do reach us out and we will be glad to serve you!

Previous Post
How to Customize Google Analytics Campaign Timeout For Affiliates
Next Post
Tracking AMP Pages with Google Analytics & Google Tag Manager

12 Comments. Leave new

  • Hi, can I know how to track all the installs from Affiliate campaigns into Firebase.

    Reply
    • Hi Shivkant,

      “For tracking affiliate data you have to create a deep link with UTM tagging. After that when app open with that deep link, firebase_campaign event will trigger with the value of a campaign. You can check this data in Firebase dashboard in the conversion section.”

      Reply
  • Hey Rajashree, great technical articles on Firebase and Analytics. Very helpful — you’ve found a very intelligent and useful workaround here.

    Reply
  • This is wonderful. Just one question, when you are picking this event through GTM, would you be using the custom event trigger of app_open? GTM does not have a default App Open Trigger. Or would you just use the default Campaign Event Parameter Variables?

    Reply
    • Hi Nonnie,

      We’re glad that you find our blog helpful. Please subscribe to get super important latest updates. To answer your qyery,

      We have no control or access to “first_open” event and when it is fired.
      For a track, Campaign data through GTM you can use “firebase_campaign” event as a trigger or you can use “Campaign” trigger which is available in GTM.

      Reply
  • Avatar
    Sandeep Kumar
    October 11, 2019 6:06 pm

    I am currently running a campaign for my application. The campaign URL also has “utm_term”, however I cannot see this parameter within firebase.

    1. Can you please tell me where I can find this by default under ‘Conversions’?
    2. If this is not available by default, do you suggest to use a custom event and pass ‘utm_term’ as a custom parameter, and mark that custom event as ‘conversion’?
    3. If there is still no way to find this, do I need to use Bigquery?

    Reply
    • Hi Sandeep,

      1. You can not find the utm_term parameter under Conversions.
      2 No, we do not suggest to pass Campaign data with a custom event.
      3. Currently, there is no parameter mentioned in the big query export schema for utm_term. But if you have GA360 and you are passing all the Firebase event data in GA then you can see all the parameter details in GA.

      Let us know in case of any concerns.

      Reply
  • Thanks for the article!
    if I have to use different utms for ios and android, should I choose between promoting my app for android or ios as I only need 1 custom url to use when doing my promotion ?
    thanks in advance

    Reply
  • Not sure if if this existed at the time of the article creation but Firebase has this type of tracking. https://firebase.google.com/docs/dynamic-links/

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu