0
votes

I want to show and compare usertraffic from Google-Analytics in Data Studio. I need to break up the traffic between localized versions of our page.

Pages Paths and user groups The basic language is German and hosted on www.domain.ltd/. The URL-path for english content is www.domain.ltd/en/ and for polish content we use the URL www.domain.ltd/pl/. I want separate the user-traffic for each language-path and compare it in a linear diagram.

RegEx I set up a new field with RegEx:

case
WHEN REGEXP_MATCH(Page, '^.*garbe-industrial\\.de\\/en\\/.*') THEN "Tarffic EN"
WHEN REGEXP_MATCH(Page, '^.*garbe-industrial\\.de\\/pl\\/.*') THEN "Tarffic PL"
else "Tarffic DE"
end 

I combined the new field to a linear diagram. The diagram does not show any data.

I tried different approaches: RegEx: .*\/en\/.* instead of the donain-path-version (1)

-- (1) Update: changed the format to "code" in order to make the full RegEx visible.

1

1 Answers

0
votes

I wonder if your regular expression is too specific in the code example. I would think that just putting in .*/en/.* and .*/pl/.* would work to capture those pages. I do something similar for our Spanish pages. This works on my pages:

case when regexp_match(page, '.*/es/.*') then "Spanish"
else "English"
end