Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am building links for my client's website and need to make a custom report in google analytics to show traffic only of the links i build.

I have tried the following:

  1. Set up custom report
  2. Define metric groups
  3. dimension drilldown: defined "referrer path"
  4. filter

here I used INCLUDE / regex with following synthax:

^(
(\/domain1.com) |
(\/domain2.com)
)$

I dont get any traffic data at all (which is wrong, when looking at referral data in channels i see visits from these domains.)

How do I do this? Is there a better way? Is my regex wrong?

share|improve this question

1 Answer 1

Yes your regular expression is wrong. \/ is a literal slash (/). A slash never preceeds the domain name.

You also specify that the referrer is exactly just the domain name. That is never the case. You are looking for a "contains" rule so you should leave off the starts with (^ ) and ends with ($) markers.

You also might want to escape the literal periods in your regex with \.. Otherwise a period in regex matches any character.

You need something like:

(domain1\.com)|(domain2\.com)|(domain3\.com)
share|improve this answer

Your Answer

 
discard

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.