Reputation: 139
Need help with Google Analytics filters via Custom Reports -- Display LANGUAGE and VISITS where the LANGUAGE values are grouped as EN for each English, etc via 'FlatTable'
My report returns (see first 3 lines):
LANGUAGE | VISITS ---------+------- en-us | 55,842 en | 3,932 en_us | 248
I would like to see:
LANGUAGE | VISITS ---------------------+----------+------- 1. en | 60,022 2. ... 3. ...
Upvotes: 2
Views: 913
Reputation: 6170
I'd recommend creating a Custom Dimension to store an extracted part from the Language Setting dimension via an Advanced Filter.
That way you will extend your data instead of replacing parts of it.
Create a Dimension LanguageCode with scope User or Session in the property's settings (Admin > Property > Custom Definitions > Custom Dimensions)
Create an advanced filter Extract Language Code in the view's filter settings (Admin > View > Filter) like so:
([a-z]{1,3}).*
$A1
Be aware that filters get applied during processing, which happens once a day. That means you'll be able to see the result the next day.
Then you'll be able to view reports or build a custom report that uses that new Language Code dimension.
Upvotes: 1
Reputation: 79
In Google Analytics Admin create an additional view to the property. Then create two custom filters:
([a-z]{1,3})[-_]?.*
Replace string: \1
That is it. Now all languages in the view will be up to 3 character long and aggregated.
Actually the regex can be more strong, but this one is more wide and covers even some wrong language settings.
Upvotes: 0
Reputation: 9603
If I'm understanding you correctly, go to Custom Reports and set one up like this:
Then, go and to the newly created report and apply a secondary dimension of Language. If you want to 'group' them by language, do a sort by Language.
I add Language to the dimension drilldown so if you were interested in seeing the possible language selection for a particular country you could do that by clicking on the country.
Upvotes: 0