Track how many people visited your site from a banner app - android

So I have a banner on a android application and I want to track how many people came to my site clicked that banner ?
What is the best way?

Tracking the source of your traffic from an app is no different from a webpage.
Onclick of your banner you might trigger a web URL like site.com/page.html.
You can add parameter to the URL by adding the source site.com/page.html?source=app
And then on your server side you can check for the query parameter to find from where this request was coming from.

you have Several choices
you can send a parametr with your website's url , for example :
http://www.yourdomain.com?sendFrom=app
you can use analytics libraries (such as fabric,facebook analytics, firebase ,...) and register events with these services when user clicks on your banner.

The app isn't mine, only the add-banner, so I can't do anything app side.
What about this: https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder

Related

Tracking when and which links are opened through my app

We have a social media kind of app where you can post content like messages, links, images etc. We would like to track when a link is pressed in the app, and which urls are opened through the app. The urls are detected in the textviews with the autolink "web" property. Is this possible to achieve with google/firebase analytics or similar?
although your question may not meet community standards.
I will try to answer, from my understanding ...
I believe that you are looking for URL tracking, this practice can be applied to applications and websites.
The most common method used today is:
Bit.ly
This tool, in addition to URL shortening. It can serve as an effective means of tracking and measuring.
but this tool also has its limitations. You have to study.
Google Analytics
With this tool you can create and use the Google Analytics tag.
So, follow this event.
It is understood that any url can be tracked with the created tag.
This practice becomes one of the most complex in metrics.
If you need to deepen your question further, be sure to comment.
Capture outbound links
Find out when users click a link to leave your site.
Note: This article applies only to sites tagged with the analytics.js snippet. (It does not apply to sites tagged with gtag.js.)
You can use Analytics Events to capture clicks on links that take users to a website other than your own.
Google Tag Manager
If you use Google Tag Manager to manage your Analytics installation, follow the instructions in Analytics Events to implement events.
Add the tag directly to your site
If you have added the Analytics tag directly to your site, you can copy and paste the script below into your own pages to set up Event measurement for outbound links. You should add this script in your page header, but not within the basic Analytics tag.
If you copy and paste this script exactly as it appears here, your outbound clicks will appear in your Analytics Events reports with a Category of "outbound" and an Action of "click". (In the snippet, these are shown in bold.) You can use these values, or change them and define your own values. Learn more about Event components.
This example assumes that you are using the analytics.js tag. See if you are using Classic Analytics (ga.js) or Universal Analytics (analytics.js).
<script>
/**
* Function that captures a click on an outbound link in Analytics.
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
*/
var captureOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
</script>
You'll also need to add (or modify) the onclick attribute to your links. Use this example as a model for your own links:
Check out example.com

Firebase Dynamic Links not working - DFL parameter

I have searched SO and the web for a similar issue, and while others appear to have encountered this problem, their solutions are not working for me.
DFL parameter in Firebase Dynamic Links Builder
Starting with Android, I'm attempting to implement the Dynamic Links for my app. The app requires additional parameters on the dynamic link, so I'm manually constructing the link based on the information here: https://firebase.google.com/docs/dynamic-links/create-manually.
I have created my link in the following manner (code abbreviated for purposes of this post)
Uri.Builder builder = new Uri.Builder()
.scheme("https")
.authority(AppPrivate.Invitation.APP_CODE + ".app.goo.gl")
.path("/")
.appendQueryParameter("link", link)
.appendQueryParameter("apn", AppPrivate.PACKAGE)
.appendQueryParameter("dfl", desktopLink);
For my use case the link and desktopLink parameters are the same - they are actual working URLs on my website. Regardless of what device the user hits with the dynamic link, it should perform the desired action. Again, for purposes of simply getting this working, I've linked to our primary website (https://www.mytravelerapp.com).
When I send the invitation from my Android device, I generate an intent based on the code sample here: https://github.com/firebase/quickstart-android/blob/master/invites/app/src/main/java/com/google/firebase/quickstart/invites/MainActivity.java
return new AppInviteInvitation.IntentBuilder(context.getString(R.string.content_trip_invitation_title))
.setMessage(message)
.setDeepLink(uri)
.setCustomImage(Uri.parse(AppPrivate.Invitation.TRIP_INVITE_DEEP_LINK_IMAGE))
.setCallToActionText(context.getString(R.string.content_trip_invitation_cta))
.build();
However, when I receive the invitation via email on my desktop, it always goes to the Play Store listing, no matter what I've added to the initial deep link (DFL, AFL). Here's a sample of the link from the "call to action" button from the email:
https://a3d4u.app.goo.gl/i/225742434763-3bd2c2fa-45f0-4ed8-aca3-37760d27d971
I've not yet implemented the receivers in the android app to listen for incoming links, so I cannot confirm whether or not the deep link behaves appropriately on that platform.
Any recommendations or suggestions on what I'm missing with the desktop link are greatly appreciated.
Thanks!
You're actually wrapping a dynamic link in another dynamic link. Invites itself generates a dynamic link, which doesn't have your DFL parameter, so it is redirecting to the store.
You could try shortening the dynamic link you generate, and sharing via the regular share dialog rather than using Invites.

Google Tag Manager for Xamarin Android app

As of my googled data, i got to know how to integrate GTM with the xamarin app. Based the url here.
The Tag manager is able to push the events to the GTM.
So question is, how to get the application data associated with GTM in the Google Analytics.
I get some links and videos while surfing for this, all are explaining about the GA for Web applications. Am looking the same for Xamarin Android application.
Edit:
Adding to the question, Will GTM capture all the button clicks with out pushing the data?
Will the data like 'submit button clicked' is transferred to GA via GTM?
Thanks
Suppose you have an image and want to know how many people clicked on it.
When the user clicks on the image you run this piece of code:
var dataLayer = new Dictionary <string, object> ();
dataLayer.Add ("event", "imageClick");
dataLayer.Add ("imageName", "Bart Simpson");
Android.Gms.Tagmanager.TagManagerClass.GetInstance (context).DataLayer.Push (dataLayer);
To get this data on GA through GTM you have to follow these steps on your GTM Container:
Create a new TAG
Choose Google Analytics as the product
Set the GA's Tracking ID and Track Type to Event
Set the Category to {{Platform}} (this will get Android)
Set the Action to {{Event}} (this will get imageClick)
Set the Label to a new Variable of the DataLayer type and named as imageName (this will get Bart Simpson)
Set Fire On to Any Event (this will trigger everytime an event is pushed to GTM)
Save and publish your container
Now you can see the events popping in you GA Console. You can send multiple variables in one push, but you will have to create multiple Tags with different events to see them in GA.
Edit:
No, you must push events to the DataLayer.
Only if you configure the TAG as explained above.
On GTM there is basic tracking for web that is the same as inserting the google analytics tracking code on each page of your website, but that only works for basic stuff like page views, not custom events on buttons.
Source

How to avoid "Redirect Notice" from Google in Android Webview

I have a an app that uses a webview and webviewclient. It's supposed to be a whitelist based browser for kids, so I'm checking urls and only allowing certain ones to be loaded. Generally its working, but when I search on google and click a search result, I get a page that says "Redirect Notice - the previous page is sending you to..."
I am not posting code because I don't know which section is relevant. Can anyone point me where to look?
Added: The problem has to be either
1) in the way Google is serving the search results (why would it it be different than the default browser?), or
2) how the webview is handling them.
I'm starting to think it has to do with the way Google is serving search results, as the links give the "redirect notice" anywhere. Here's an example link:
http://www.google.com/url?sa=t&source=web&cd=2&ved=0cccqfjab&url=http%3a%2f%2faerik.com%2f&ei=dlwwt-bgc-wciqk8tkzadw&usg=afqjcnhkstsuy-erndsrb4nkkpvda_xutq
If Google is serving my app search results differently, could it be because of cookies or user-agents? Does a webview automatically handle cookies and send the default user-agent?
Ah... I figured it out. I doubt anyone else will have a similar issue, because the root cause was that I was lowercasing the URL as I checked it against the whitelist, then loading the lowercased URL... kind of dumb, but then again, many bugs are.
Sign in with your google account, then visit the url. It will work. Once you successfully visited the url, you can revisit that site .

Work around AdMob's 35-character URL limit?

To advertise an app on AdMob, you select a “Target URL” which is where users get directed when they click on your ad. A Target URL to the Android Market might look like this:
market://details?id=com.example.myapplication
You also have to enter a “Display URL” which gives users a preview of what they will see once they click on your ad. I could see this URL being (a) the same as above, or (b) the web equivalent of:
market.android.com/details?id=com.example.myapplication
The problem is that Google institutes a 35-character limit on the Display URL, and my understanding is they are no longer accepting exception requests for this. I understand Google does this to block URLs like this:
www.GoogleThinksThisIsTooLong.com/HereIsEvenMore/AndMore/
How can I work around this without re-publishing the app with a ridiculously short package name? The generic segment “market://details?id=com.” is already 24 characters, and “market.android.com/details?id=com.” is 34 characters!
To answer the first response about using a shortened URL:
I have not actually tried that, but Google's requirement is: "The display URL's top level domain must match the landing page URL of the promoted website."
http://helpcenter.admob.com/content/add-your-mobile-site-or-android-app
And they do not allow redirection. They do go on to say: "If the URL is too long, a shortened version may be used."
So maybe they are referring to your suggestion.
What about using a ShortURL Service like Twitter? There is even one powered by Google: Goo.gl

Categories

Resources