Analytics
1.8K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

How to create a Segment using regex to include certain keywords and exclude others?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to create a Segment for branded organic search traffic. But we've also added a filter that changes any (not provided) keywords to one that is in the format of "np - http://www.domain.com/url". This way while we don't know exactly what the keyword was we can at least infer something from the landing page. But it makes a branded segment more difficult since the brand is in the URL.

 

Therefore, I need to create a regex statement in a Filter on Keywords that:

 

1. Includes the branded terms (as an example): john smith, john, smith

2. But excludes keywords that contain the branded terms from #1 if the keyword includes: np, http, https

 

I've tried to come up with a regex but it's not working. Thanks for the help.

Marked as Best Answer.
Solution
Accepted by topic author Lloyd S
December 2016

Re: How to create a Segment using regex to include certain keywords and exclude others?

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

You can try something like this:

 

segment.png

How to create a Segment using regex to include certain keywords and exclude others?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Cool, I was just using Traffic Sources and forgot Conditions.

 

But at the same time, I'm guessing that I can't accurately track what I want since a portion of the "not provided" traffic is going to be branded.

How to create a Segment using regex to include certain keywords and exclude others?

Participant ✭ ✭ ☆
# 4
Participant ✭ ✭ ☆

Unfortunately most of the organic keywords are (not provided) Smiley Sad