All Posts by Mike Annable

Break Down Your Website Visitors With This Case Statement

This example is showing how to break down your visitors from your Google Analytics for a car dealership.

The issue car dealers face is they have 5 or more “businesses” under one website. New Cars, Used Cars, Service, Parts, Fleet etc…

It’s very important to pay attention what your visitors do, and where they come from.

This is one example of how we can display it in Google Data Studio
Here is another example of how you can visualize.
I prefer to write my own tags, and I measure where users click to as opposed to what they view. It’s far more accurate.

Assuming you don’t have these events, you can use pages.

The Case Statement

CASE 
WHEN REGEXP_MATCH(Page,".*new.*")THEN "New"
WHEN REGEXP_MATCH(Page,".*used.*|.*preowned.*")THEN "Used"
WHEN REGEXP_MATCH(Page,".*service.*")THEN "Service"
WHEN REGEXP_MATCH(Page,".*parts.*")THEN "Parts"
WHEN REGEXP_MATCH(Page,".*fleet.*|.*commercial.*")THEN "Fleet"
END

Double check what your urls say, but this is a good start.