Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App link tracking with Firebase

We have an Android and iOS app. We want to track from what links our app was downloaded. So if we posted a link on Facebook of our app and someone clicks on the link and download it, it should log that the app was downloaded on Facebook.

So with some research I found Google Analytics has something called campaigns and you can setup a link with this campaign and then log it through Google Analytics. But we already added Firebase into our app so when I try to setup this campaign on Google Analytics it takes me to Firebase, it looks like you can't have both.

I will do it through Firebase if I just found some documentation on this. The only thing I saw was dynamic links but I don't think this is going to help me.

Can someone just point me in the right direction on how I can track from what link our app was downloaded?

like image 262
Lian van der Vyver Avatar asked Nov 21 '16 09:11

Lian van der Vyver


People also ask

Is Firebase dynamic links free?

Dynamic Links are smart URLs that allow you to send existing and potential users to any location within your iOS or Android app. They survive the app install process, so even new users see the content they're looking for when they open the app for the first time. Dynamic Links are no-cost forever , for any scale.

How do I create a dynamic link in Firebase?

You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app. These parameters specify the links you want to open, depending on the user's platform and whether your app is installed.

What is Firebase tracking?

Firebase Analytics uses an event-based data collection model, which is unique to mobile apps. By default, Firebase Analytics ties in with the Firebase platform to track a number of events automatically.


Video Answer


2 Answers

Firebase Analytics SDK supports campaign events as long as you setup one of the required campaign parameters, such as utm_source, utm_campaign or utm_medium. You should construct the link on your Facebook to include those parameters. Once you have your app opened by such link, Firebase Analytics will automatically log campaign events for you.

Since I am an iOS developer, I'll answer your iOS questions (I believe that Android should be similar). You will also need to setup your app so that it can be opened by URL. On iOS, you may need to setup URL scheme or universal link: For URL scheme:

In the Info tab of your app's Xcode project, create a new URL type to be used for Dynamic Links. Set the Identifier field to a unique value and the URL scheme field to either your bundle identifier or a unique value. If you set the URL scheme to a value other than your bundle identifier, you must specify the bundle identifier

Note that Universal Link on iOS will require having the file apple-app-site-association at the root of your server. This might be a complicated process so that's why Firebase Dynamic Deep Link makes it easier to setup and handle campaign events.

like image 91
adbitx Avatar answered Sep 22 '22 19:09

adbitx


Alex's answer is all right but requires additional app set-up for both iOS and Android. Moreover, on Android, it's complicated with links that redirect you to Play store if you don't have app installed. More about deep linking.

Another way: Since Facebook is not yet supported as Ad-network in Firebase Analytics - Attribution - Network settings, you can still use referral tracking with Google tool meant for other platforms - you will just see InMobi or any other choosen site instead of Facebook. You can even enclose UTM parameters for Google Play or App store - where you can also measure downloads (but not other metrics).

You can use link for download (Google Play) like this (generated for our app):

https://app-measurement.com/redirect?gmpaid=1:45581111234567:android:94b75050a1234567&anid=inmobi&aclid=1&cn=your_campaign&adid=$GPID&cs=Facebook&url=https://play.google.com/store/apps/details?id=com.yourpackage

With parameters for Play Store

https://app-measurement.com/redirect?gmpaid=1:45581111234567:android:94b75050a1234567&anid=inmobi&aclid=1&cn=your_campaign&adid=$GPID&cs=Facebook&url=https://play.google.com/store/apps/details?id=com.yourpackage%26referrer=utm_source%3Dfacebook%26utm_medium%3Dcpc%26utm_term%3Dyellow_submarine%26utm_content%3Dvote_for_stark%26utm_campaign%3Dgreat_campaign%26anid%3Dadmob

like image 30
Kuba Chour Avatar answered Sep 18 '22 19:09

Kuba Chour