Fixed missing traffic from Android app in Google Universal analytics
Google visits analytics fix, part of direct visits you get access from android.
What’s going on?
In the old Legacy Google analytics (ga.js) it is possible to see traffic from sources starting with com, this is traffic from Android applications. This traffic is no longer in the newer Google Universal analytics and falls into direct traffic. This guide fixes a UA implementation bug that has been reported since 2012. The practical point is that UA (analytics.js) cannot work with the android-app:// referral .
Sample data from old original Google analytics:
Data explanation:
The name com.something.something corresponds to an application in the Google play store.
https://play.google.com/store/apps/details?id=com.google.android.gm
> Gmail
Attendance from
com.google.android.gm
is Gmail
com.google.android.googlequicksearchbox
is a Google application
com.google.android.talk
is a Google Hangout
com.google.android.apps.plus
is Google plus
There are other applications outside of Google:
com.facebook.katana
is the main Facebook application
com.facebook.lite
is a lightweight Facebook application
com.twitter.android
is a Twitter application
com.slack
is Slack
com.instagram.android
is Instagram
Are we talking about how much traffic?
It depends on the type of website and its target, but on average I will find another 10% of additional organic traffic obtained from direct traffic. For highly mobile websites, it can be as much as 2-3 times as much. Overall, these percentages increase with the constant growth of mobile traffic.
How to fix it?
Add traffic data data outside of the classic UA, making the custom dimension a real full referral.
GA filter to correct direct traffic to real values.
Bonus for smart individual heads:
In addition, you can rename traffic from com.google.android.googlequicksearchbox
to “organic” if you wish . And make com.facebook.katana and other social networking applications “social”.
1) Add custom referral dimension to Google Universal analytics.
- Go to Google analytics > Admin> Service> Custom Definitions> Custom Dimensions
- We create a new custom dimension
- name it “True referral”
- Set scope to Range to “Hit”
- Create and remember the number of the created dimension.
- Go to Google tag manager and select the GTM container
- Go to variables and configure> enable by variable in Built-In Variables
Referrer
- Go to your Google analytics variable and add your new dimension, the GA number, in your custom variables. Value
{{Referrer}}
- Save and test, publish the GTM container.
2) Create Google analytics filters to correct traffic.
I strongly recommend testing it first on a separate test Google analytics view and then if you like to put it on the main GA profile.
To fix a traffic source step by step instructions for setting up the filter
- Go to Google analytics> Administration> select the given view (view)>
- The name of the filter
Android app filter source
- Filter Type –
Custom
- Field A -> Listing A>
True referral
(custom dimension created by you with referral) Set value:^android.app...(.*)
- Field B-> Listing B>
Campaign Medium
Value(none)
- Output to -> constructor>
Campaign source
$A1
- Field A is required.
Yes
- Field B is mandatory.
Yes
- Overwrite the output field
Yes
- Case sensitive
No
- Save
Function description:
If the value of medium is (none) and in its own dimension it is the value of the referrer corresponding to a regular expression, then the value of the visit source is prescribed for the value obtained from the referrer.
To fix traffic media step by step instructions for setting up the filter
- Go to Google analytics> Administration> select the given view (view)>
- The name of the filter
Android app filter medium
- Filter Type –
Custom
- Field A -> Listing A>
True referral
(custom dimension created by you with referral) Set value^android-app:.*
- Field B-> Listing B>
Campaign Medium
Value(none)
- Output to -> constructor>
Campaign medium
android-app
- Field A is required.
Yes
- Field B is mandatory.
Yes
- Overwrite the output field
Yes
- Case sensitive
No
- Save
Function description:
If the value of medium is (none) and in its own dimension the value of the referrer corresponds to a regular expression, then the prescribed value of the medium is fixed to “android-app”.
Result:
Your direct visit has decreased a bit and new media and new sources of visits have been added.
With this step, you have gained a transformation that you can use in addition to this fix in other places where GA tells you something else :), for example, it will allow you to break down by Google domain, for example .cz .sk etc.
Of interest, a real referral will show you, for example, that the app from the apps is in fact a newsagent 12 times higher than we will fix, because the newsstand has an android-app referer, but it is then rewritten to something else.
Another interesting feature is Doubleclick, which transmits a very nice set of data in a referral.
You can see other different dates here:
domain.com / email android-app://com.google.android.gm
– Although you have a marked UTM, but you can see that it came from Gmail 😉, this view of the originally unrated referrer UTM is really useful.
google / cpc android-app://com.google.android.googlequicksearchbox
– Google in-app advertising.
google / organic android-app://com.google.android.googlequicksearchbox/https/www.google.com
– Properly tagged organic from your Android mobile from the Google app.
For me, this adjustment is quite important, due to the growing number of accesses to the web from mobile phones, the problem will be growing.
Solve comments on social networks, just mark me there if you want an answer.