Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a blog that targets different regions. The Europe region blog has different sections in different local languages such as English, French and German. I wonder how to track and analyze the different sections.

My initial thought is to search the domain URL, but I found it is not a good idea. For example, the URL for the Europe blog is like If you click the French section, the URL is like If you click an article in the French section, it is like Notice the article link is not!

share|improve this question
Can you clarify what you mean by search the domain URL? – dan May 5 '14 at 6:29
I believe that he was considering setting up reporting in analytics URL path matching. – Stephen Ostermiller May 5 '14 at 11:01

2 Answers 2

You may want to rethink your URL structure. There are good SEO reasons to put all your French content into a single directory that is separate from the other languages. See How should I structure my URLs for both SEO and localization?

If you can't do that, Analytics does allow you to specify a custom variable. The variable could specify the region and language for the page. Your blog would need to set the custom variable in the Analytics JavaScript snippet for each page view.

Once the custom variable is in place, you can get segmented reporting using advanced segments within Google Analytics.

share|improve this answer

Short of rethinking you URL structure (I'm with Stephen Ostermiller), you can use Virtual Pageviews and some conditional switching for this. On your template that displays single posts, you'll need to do some checking. Pseudo code...

$region = get_the_region();
$lang = get_the_language();

Then, instead of the default call to GA:

ga('send', 'pageview');

you'll print out those variables in a virtual pageview.

ga('send', 'pageview', {
  'page': '<?php echo $region . "/" . $lang; ?>/article-name'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.