What I am trying to achieve is the following:
1. Get the referrer details when the app was installed.
2. Do I get the details of the referer if the user never opened the app?
This is what I want to do with the app:
Put the APK on mydomain.com. When I buying traffic to send to the app I will send it to mydomain.com?referrer=123.
Add the APK to Google Play.
When users will (hopefully) install the app, I would like to know more about how they go there. i.e. Referrer.
In Google Play it is INSTALL_REFERRER (https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-implement) and on mydomain.com I suppose it will be utilising it like so: http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters.
FB on the other hand said that intentAndroid is deprecated and to use Linking instead.
How do I go about that?
Thank you!
Related
I want to have referral links to get the referral code with in the application (after installation) to provide credits based on the code for both Android and iOS.
I was able to explore these options:
1. Play Install Referrer API
Where the url would look something like: https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_source%3Dstaff-referral%26utm_content%3713491235
Where I can get the content 713491235 using the Play Install Referrer API. However the problem here is this is very specific to Android and cannot work for iOS.
2. Firebase deep linking
Where the url would look something like: https://myapp.page.link/?link=https://mywebapp.com/713491235&apn=com.example.myapp
Where I can get the url https://mywebapp.com/713491235 using the Firebase deeplink api. This seems to solve for Android and iOS, but there isn't much information on how long the deeplink is alive, meaning
What happens if I install the app using deeplink but don't open the app for few days. Will it still be available when I open the app later.
What happens if I click on the link, but do not install then are there. Instead install it later by searching on playstore and installing. Will I still be able to get the link once the app is open?
Is there a way to combine both the Play Install Referrer API and Firebase deeplink? like - https://myapp.page.link/?link=https://mywebapp.com&apn=com.example.myapp&afl=https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_source%3Dstaff-referral%26utm_content%3713491235 so that if the app is not installed on Android, we can use the Play Install Referrer API(which looks more reliable).
And I am not able to understand the purpose of Play Install Referrer Links, if they are not converted to universal links, because often we don't know which device the url will be used on. Sharing a link specific to playstore doesn't seem to help. What exactly is the usecase of Play Install Referrer?
Because in case of Play Install Referrer API they were clearly mentioning:
Caution: The install referrer information will be available for 90
days and won't change unless the application is reinstalled. To avoid
unnecessary API calls in your app, you should invoke the API only once
during the first execution after install.
I'll answer your questions one by one - I think Firebase Dynamic Links are the better choice for you, based on your requirements.
I couldn't find anything in the documentation for this, but it seems that the link will expire roughly 1 hour from install time (as said here and here).
Android and iOS integration methods are interestingly different in Firebase - if an new iOS user taps the link, it will copy the Dynamic Links URL to the clipboard and read it when the app is opened, whereas Android calls the intent handler for the URL, which in turn calls a Firebase function that extracts the link.
This means that an iOS link, until a user copies something else, should still work - which effectively means a short lifetime, as you can't rely on your users not copying something else. For Android, though, the intent handler is the link - if a user breaks the flow, it'll no longer work.
From a technical view, you could completely create a double-link - I'm not sure whether that would be needed, though, as I'm not sure on how the Play Install Referrer API works and I assume it will use a similar method with them both being developed by Google.
The main use case of the Play Install Referrer API is to track the effectiveness of ad campaigns on a mobile app - the data received from the API is similar to the UTM parameters at the end of a URL (e.g. utm_campaign, utm_source) that tell the website owner where the user comes from. They can be used in situations where the advert knows what your device OS is - for example, an advert inside another app.
Below is my scenario:
If the app is installed, launch the app pass a referrer data and handle it inside the app.
If the app is not installed , direct to google play install the app handle the referrer data.
I am able to achieve first case
For scenario 1 , I have
link 1:
http://www.xxx.co.in/main?id=4&referrer="+referrer
My activity is configured correctly and I am able to achieve scenario 1.
For scenario 2, I have
final String url = "http://www.xxx.co.in/main?id=4&referrer="+referrer+"#Intent;scheme=market;action=android.intent.action.VIEW;package=com.xxx&referrer="+referrer+";end";
This I am not able to achieve, If the app is not installed, instead of directing me to google play, it tries to open www.xxx.co.in/main.... in browser.
What is wrong here and how to achieve this.
NOTE: I do not want to host my own server hence redirecting from a remote server is out of scope.
Are you opening this link in the native Android browser, or Chrome? That looks like an Intent link, so it will only work in Chrome even if it is formatted correctly. However, Chrome doesn't support the Android Play referrer
To be honest, this sounds like a perfect use case for an external deferred deep linking service like Branch.io (full disclosure: I'm on the Branch team). Branch links do exactly what you're describing, and they do it on all browsers while saving you from the headache of needing to handle all the different variations. All you need to worry about is defining a set of key/value parameters (for example: articleID: story123) when you create a link, and Branch makes sure those parameters are returned to you inside the app the first time it launches after the user clicks the link, whether or not the app was installed when the link was clicked. You can then use the values to route/customize however you wish.
What are the alternative ways for us to track downloads without installing the FB Android SDK (we prefer not using SDKs due to various reasons)? Ideally, we want to route the click to our tracking server prior to sending the user to the Play Store, but could settle with adding a referrer without routing the user to our tracking server. If the latter is an option, where in the setup do we specify the referrer value?
It would appear you could also use the Google Analytics SDK to capture the Intent containing referral data.
Essentially you'd create a BroadcastReceiver (AnalyticsReceiver/CampaignTrackingReceiver) that listens for the installation event and passes and Intent with referral data after install to the app.
Valuable information regarding this method can be seen in the links below:
How to test android referral tracking?
https://support.google.com/analytics/answer/3389142?hl=en
I am not currently using Facebook's Android SDK in my Android app, and I only want to integrate it enough to capture installs via Facebook Mobile App Install Ads.
The documentation describes the need to "[c]omplete your Basic page under App Settings." If I enter my app's package name--and only its package name--I get an error:
You have specified Package Name, but you did not specify Class Name. Launching a native Android application requires both.
I don't want or need my app to be launched, do I? I only want to track conversion rates of ad clicks to app installs (and runs). The only way I can get the Promote link to show up on the left is to supply values for Class Name and Key Hash and set Facebook Login to Enabled. Is this really necessary?
Yes, it is necessary to fill out those basic details to use our SDK, however, those fields are only used for login authentication via fb - which is the most popular use case for our SDK. Your app will not be launched or anything like that if you supply those fields. For your case, just fill them out and leave it as is and you will be able to run ads without worrying about anything else.
The API requires these fields. Although in my experience it doesn't launch your app. It is merely used for the credentials in the development side of the Facebook integration in www.developer.facebook.com
Hope that helps.
RF
when providing a user on a mobile, a link to an android application via a web page, it is possible for params from the url to be passed to the app being installed.
I'm guessing the answer is no - but it doesn't help to ask.
The reasoning being that it would be handy for some situations to have a generic app that pulls config information from the referrer.
This is possible only for the use case of referral tracking, using the Analytics Tracking for Mobile Apps SDK. The documentation will have more details, but the basic steps are:
Create referral-tagged market deep link URLs using this tool.
Use these links on web sites that you want to track referrals from.
When a user downloads your app using the referral link, the referral info is stored.
Upon first run of your app, use the Analytics SDK to track a 'first-run event' using trackEvent. If your app was downloaded with referral info, this event (and all future event and pageview tracking) will be tagged with the referral info.
In Analytics, you'll be able to filter these events on campaign/referral info.
I think you can change a bit the scenario of the anlytics referral tracking to pass parameters to your app during installation if you need...
You have to declare a custom receiver for com.android.vending.INSTALL_REFERRER in the custom receiver parse the url from the market.
If you want the analytics to work as well, is better if you extend the com.google.android.apps.analytics.AnalyticsReceiver and call the super.onReceive
There are two parameters that are optional in the referral the campaign term and the campaign content so I will put there the information you want to pass
I worked a bit on this and I wrote a post where I explain even how to test it : http://www.dev-articles.com/article/Analytics-referral-tracking-for-Android-447001