Analytics
2.6K members online now
2.6K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

Custom report based on URL

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello there,

 

I'm looking for a way to filter the data in our website statistics based on the language switch, and I need some help with setting up the report.

 

Our website's source language is Dutch (www.website.com/), and then there is English (www.website.com/en) and German (www.website.com/de). Among other data, I would like to see what pages have been visited in what languages. 

 

Any ideas on how to deal with this? I suppose the Metric Group is Pageviews, Sessions etc. and the Dimension Drilldown is Page.

The filter probably has to look something like:

Exclude Page exact /en|/de - for the Dutch report

Include Page exact /en - for the English report

Include Page exact /de - for the German report

 

But I hope someone can confirm this Smiley Happy Thanks in advance!

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Naomi Z
November 2016

Re: Custom report based on URL

Top Contributor
# 6
Top Contributor
Hi Naomi,

It's straight forward to create another view for each language actually, and in the long run it may be better and easier. To do that, all you have to do is to make a copy of your main reporting view ("Filtered Data," I guess) and then just simply ADD another filter that includes ONLY the language that you want. For example, if you want to include only the German pages, then your include filter would just be Include "Request URI" and then the filter patter would be "^/de($|\/.*)", so this includes pages like "/de", "/de/", "/de/something/else". Try this out in your "test" view first! If you still want to go with the inline filters method, then just use the same regex patterns I mentioned earlier (slightly modified):

English - ^/en($|\/.*) = captures formats like "/en", "/en/", "/en/something else"
German - ^/de($|\/.*) = captures formats like "/de", "/de/", "/de/something else"

For Dutch, you could use two exclude filters that exclude the English and German patterns. I think this way may be easier to do than to write the include filter for Dutch.
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

View solution in original post

Re: Custom report based on URL

Collaborator ✭ ☆ ☆
# 2
Collaborator ✭ ☆ ☆
Hi
Your filters should be
Exclude Page matches regex ^(/en|/de) - for the Dutch report
Include Page matches regex ^/en - for the English report
Include Page matches regex ^/de - for the German report
hope this helps
Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog

Re: Custom report based on URL

Top Contributor
# 3
Top Contributor
Hi, Naomi Z,

I'm not sure why you are doing Excludes and Includes, but I'm presuming you are using the same property to track each localisation (ie. "/", "/en", and "/de"). If this is correct, then I'm presuming you have also set up different views for each localisation. Can you confirm what structure you have set up for reporting? There are a couple of options, at least, to filter by the language:

1. set up an Include filter for each view - "Include / only" for the Dutch view, "Include /de" for the German view, and "Include /en" for the English view. The main thing to note with these filters is that you shouldn't include multiple "Include" filters in the same view because of the way filters are processed in GA (top down), so you can't really include "/" AND include "/de". You shouldn't need both an Exclude /en or /de if you are already doing an Include. In other words for your English report, you just need to say "Include /en" or for your German report, just "Include /de" - no need to exclude anything.

2. use inline filters if you are just sending all traffic from all localisations into the same view. So in your Advanced filter, you would just specify a Page regex like ^/($|[^en|de].*) for Dutch , or ^/en($|.*) for English (might need to test those filter out first!)
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Custom report based on URL

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi Nikhil, thanks for your answer! Stupid question perhaps, but wouldn't regex ^/en mean that for example the page www.website.com/en/energy-solutions would also be tracked along with www.website.com/en? I'm pretty new to this and I'm still figuring out what everything means Smiley Happy

Regards,

Naomi

Re: Custom report based on URL

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Hi Nicky Y,

 

Thanks for your reply! I'm pretty new to this so bear with me please, but website.com is the Property (so that includes all three languages, in other words the whole website has one tracking ID) and I created 3 Views within this property: filtered data, unfiltered data, and test. So, regarding your assumption, I don't use different Views for different language switches.. and tbh I wouldn't know how to set that up (and still have the whole filtered/unfiltered/test structure per language/View).

That would mean that I would have to go with your second option, but I'm afraid I don't have enough Analytics knowledge to figure it all out on my own.. Would you be able to help me with that? Since I really do want to understand!

 

Regards,

Naomi

Marked as Best Answer.
Solution
Accepted by topic author Naomi Z
November 2016

Re: Custom report based on URL

Top Contributor
# 6
Top Contributor
Hi Naomi,

It's straight forward to create another view for each language actually, and in the long run it may be better and easier. To do that, all you have to do is to make a copy of your main reporting view ("Filtered Data," I guess) and then just simply ADD another filter that includes ONLY the language that you want. For example, if you want to include only the German pages, then your include filter would just be Include "Request URI" and then the filter patter would be "^/de($|\/.*)", so this includes pages like "/de", "/de/", "/de/something/else". Try this out in your "test" view first! If you still want to go with the inline filters method, then just use the same regex patterns I mentioned earlier (slightly modified):

English - ^/en($|\/.*) = captures formats like "/en", "/en/", "/en/something else"
German - ^/de($|\/.*) = captures formats like "/de", "/de/", "/de/something else"

For Dutch, you could use two exclude filters that exclude the English and German patterns. I think this way may be easier to do than to write the include filter for Dutch.
Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Custom report based on URL

[ Edited ]
Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hi Nicky,

 

So I've copy-pasted the DE regex in my 'Filtered Data' view, just to be able to use the filter verication option. It obviously works (so, thanks for that!) but I noticed something strange, which I wanted to have cleared up before I go ahead and actually apply it to the 'Test' views. It appears that except for one or two pages, GA only tracked pageviews but no sessions: https://i.imgsafe.org/5cfb0b6e53.png

 

And the list goes on. I know that sessions are only registred when the browser is closed, the user navigates to another website or the user is inactive for 30 minutes. We don't have many visitors on our website yet, but I can't imagine that nearly all pages were the final destination. With your experience, do you think something's wrong with the Filter Verification or do you think it just means that the website isn't 'interesting' enough for the visitors? I'm hoping it's the former however I'm afraid it's the latter..

Thanks!

Re: Custom report based on URL

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

@Nicky Y @theniks Hi Nicky and Nikhil, would you be so kind to help me out with this issue? I can't find anything about this no sessions/still pageviews on Google!

Custom report based on URL

Top Contributor
# 9
Top Contributor

Hi, Naomi Z,

 

I would actually take the filter verification results with a grain of salt. I've not relied much on that in the past, but would rather test the filter in a test view before applying to your production view. So that might be a better step, to set up that test view with your filter, and then to let that view collect data to see if your filter is actually working.

 

Hope this helps!

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Re: Custom report based on URL

Visitor ✭ ✭ ✭
# 10
Visitor ✭ ✭ ✭

Ah that clears it up. Thank you for your help Smiley Happy