Google Play referral code from one app to another - android

I'm looking to link to another app from my own, and have the other app be able to track referrals. I'm not the developer on the linked-to app, so I can only assume they set up their BroadcastReceiver to do this correctly.
However on my end, the flow for a user being linked to another app using an http URL is very poor, with little or no conversion being the likely outcome. I'd sooner just directly link the users to the Google Play app. However, I don't know (and can't find any documentation one way or another) online saying whether or not referrals work the same or at all when using the market:// uri to link the user to the Google Play store.
Normally, you would generate an url like this:
https://play.google.com/store/apps/details?id=com.example&referrer=utm_source%3Dfrommyapp%26utm_medium%3Dandroid%26utm_term%3Dbutton
(from https://developers.google.com/analytics/devguides/collection/android/v2/campaigns#referrals)
I'd like to do something more like this:
market://details?id=com.example&referrer=utm_source%3Dfrommyapp%26utm_medium%3Dandroid%26utm_term%3Dbutton
Has anyone had experience with this?

Related

Play Install Referrer vs Firebase Deeplinking

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.

How do I use Google assistant to trigger my application

I am trying to build a simple app which can be triggered by google assistant.
Like if the users say, "Hey Google, Open TestApp" or "Hey Google, perform xyz from TestApp".
What would be the best approach? Dialogflow?
Saying "Okay, Google - do [something] with [your app]" in order to open your app to fulfill a query is called a Google Voice Action and you can add these to your app quite easily. See the documentation here for full details. Keep in mind - for these to work, your app does need to be in the Play Store, uploaded as a beta at the very least.
The Google Assistant is a little bit different - it's more conversational and doesn't take the user directly to your app. Instead, it takes the user's input, looks for the appropriate app to handle the query, feeds the query to your app, and then returns the response, within Google Assistant itself. This is all about having a conversation with an app, from the Google Assistant, without actually opening up your app.

Google app indexing, how to check if it works on the website

I've done a bunch of app-indexing work on our mobile app from tutorial here , and it seems to work locally, when I typed something in Google Now launcher box, the historical results show, clicking on it brings to our app.
However, we track our weburl we submitted when doing app-indexing for the past month, no records of googlebot shown.
So how do I check whether I did things correctly or the bot really working?
Thanks
There are a couple things you can do:
Test whether your deep links are correct. You can do that with the Deep Link Testing tool, see this doc for information on that.
You can measure your deep links performance now, see here how to implement this, but basically the referrer information would be passed on in the Intent.EXTRA_REFERRER intent for you to extract referrer info.
You can use Search Console both to render your app, and to track its performance. For this you would have to add the app to Search Console (Add Property, then add the android app package name: android-app://com.xyz)

Multiple market handlers cause app not to be found

Google suggests the way to link to the Google Play Store is:
market://details?id=<package_name> if you are in an application,
and
http://play.google.com/store/apps/details?id=<package_name> if
you are on a webpage.
When we followed this strategy, we got a toast of "No such app found", even though the Google Play Store had the app we were looking for.
This turned out to be caused by the competition of two market handlers: F-droid (Open source marketplace) and Google Play Store. I found there were multiple by looking at the package manager for the intent resolvers.
I only ever want apps in the Google Play Store to be linked to by my app.
Is there a way to force that app to respond to my market://[...] link?
Other strategies suggest attempting one approach, and if that fails, trying the http://[...] link. (The linked solution failed for me, as no exception was thrown.)
What will go wrong if I always link via the http:// method? I.e., skip the market:// link, and use http:// directly in the app. Will this decision come back to haunt me later?
I'm not linking to open source apps, I'm linking to Google play store ones
No, you are trying to open a Uri with an ACTION_VIEW Intent. In principle, the user is welcome to handle that request with anything they want, just as they can open a PDF with whatever app they want. This is one of the few places in Android where I think that it is justified to try to force the issue and steer the user to a particular app and away from whatever they might normally choose.
I only ever want apps in the Google Play Store to be linked to by my app. Is there a way to force that app to respond to my market://[...] link?
If you are the one calling startActivity() for this Uri, you could wrap the Intent in Intent.createChooser(). This would force the chooser dialog to appear, avoiding the default, if there is more than one activity matching the Intent. This is the safest and most stable approach, as it does not depend on any details of the Play Store itself.
You could call setComponent() on the Intent and provide a ComponentName that theoretically points to the desired activity. That's one Google refactoring away from breaking.
You can try to see if setPackage() will limit Intent resolution to your desired app. Once again, if Google decides to switch to a different package as its entry point to the Play Store, you would have to adapt. And I'm not sure if setPackage() is honored in this scenario.
Other strategies suggest attempting one approach, and if that fails, trying the http://[...] link. (The linked solution failed for me, as no exception was thrown.)
Yes, because your problem isn't that there's no match, but that there are multiple matches, and another choice was made instead of the one that you want.
What will go wrong if I always link via the http:// method? I.e., skip the market:// link, and use http:// directly in the app.
This doesn't really solve your problem, insofar as there are other apps that handle that Intent, like Web browsers.

Can I track what keywords lead users to find my app on Google Play?

I know I can add a referrer parameter to the Google Play URL to track downloads from a specific source, but can I track which keyword searches users used to find my app on Google Play?
Before Google Play, i.e Android Market, I was receiving in the referrer all the relevant information to help me understood how my app was found.
It could have been keywords, tops, similar applications, etc.
It was really, really useful.
Since Google Play, I do not receive anything anymore. The only referrers I get are the one I set manualy when I do some campaigns. I spent a lot of time trying to understand why, but it looks like Google Play just doesn't send this information anymore. Doesn't make sense to me, however.
However, you'll get keywords of how users found your application on Google Play from Google search engine (if they hit "Install on my phone" button).
Referrer example utm_source=google&utm_medium=organic&utm_term=my+keyword
(doesn't work if user is using https Google search)
Not exactly, because your app is found by keywords defined by YOU.
-> If you're selling navigation based app, you may enter "navigation". Therefore it appears under keyword navigation and in that case, the result would be relevant.
If they open something related to app that is related to your app, will you be interested in the first keyword that could have been something totally different?
-> If there's an app with keyword "children", they open it and Google Play then recommends something else with children, they open it. Then, this second app, having also keyword children could have a tag "navigation". Then Google Play could recommend YOUR app. I don't believe that tag "children" would be your concern :-)

Categories

Resources