pedroteixeira07
pedroteixeira07

Reputation: 101

Google Analytics RegEx: Include all URLS with string "example" but exclude the ones with ".com/example"

Hi I'm trying to filter some data in GA but facing some issues which I don't understand.

I want, from a list of URLs:

a) include all that have "retailer."
b) include all that have "/car/"
c) exclude all that have ".com/car/"

The goal is to capture all URLs that start with the subdomain retailer. and pages such as retailer.example.com/model/car/example1 or "retailer.example.com/model/car/example2" but not "retailer.example.com/car/something"

I've tried several options but can't seem to get what I need. Any suggestions?

Upvotes: 0

Views: 799

Answers (1)

CAustin
CAustin

Reputation: 4614

This regex pattern should do the trick:

retailer\.[\w.]+\.com/[\w.]+/car/[\w.]+

In action: https://regex101.com/r/VSY37r/1

Upvotes: 1

Related Questions