Car Dealers: 3 Case Scripts To Make Your Data More Readable For Google Data Studio

If you were to do this in analytics using search and replace, the data wouldn’t go back in time. With data studio, it’ll change it all.

Car Brand Audience – Before & After

Installation Instructions Below

CASE
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Ford" Then "Ford"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Chevrolet" THEN "Chevy"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Toyota" THEN "Toyota"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Ram Trucks" THEN "RAM"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Jeep" THEN "Jeep"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Honda" THEN "Honda"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/GMC" THEN "GMC"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Dodge" THEN "Dodge"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Nissan" THEN "Nissan"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Subaru" THEN "Suburu"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Cadillac" THEN "Cadillac"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Buick" THEN "Buick"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Lincoln" THEN "Lincoln"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Audi" THEN "Audi"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Kia" THEN "Kia"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Lexus" THEN "Lexus"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Chrysler" THEN "Chrysler"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Volkswagen" THEN "VW"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/Mercedes-Benz" THEN "Kia"
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Brand/BMW" THEN "BMW"
ELSE "In-Market Segment
"
END

Used Audiences

CASE
WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Pickup Trucks/Pickup Trucks (Used)" Then "Pickup Truck"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/SUVs/SUVs (Used)" Then "SUVs"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Sedans/Sedans (Used)" Then "Sedan"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Luxury Vehicles/Luxury Vehicles (Used)" Then "Luxury Vehicle"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Sports Cars/Sports Cars (Used)" Then "Sports Cars"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Crossovers/Crossovers (Used)" Then "Crossovers"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Coupes/Coupes (Used)" Then "Coupes"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Vans & Minivans/Vans & Minivans (Used)" Then "Vans/Minivans"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Convertibles/Convertibles (Used)" Then "Convertibles"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Hatchbacks/Hatchbacks (Used)" Then "Hatchbacks"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Hybrid & Alternative Vehicles/Hybrid & Alternative Vehicles (Used)" Then "Hybrid"

WHEN In-Market Segment = "Autos & Vehicles/Motor Vehicles/Motor Vehicles by Type/Microcars & Subcompacts/Microcars & Subcompacts (Used)" Then "Microcars"

ELSE "In-Market Segment"

END 

Languages

CASE


WHEN REGEXP_MATCH( Language , "es.*|Span.*") THEN "Spanish"

WHEN REGEXP_MATCH( Language , "en.*|En.*") THEN "English"

WHEN REGEXP_MATCH( Language , "fi.*") THEN "Finnish"

WHEN REGEXP_MATCH( Language , "ru.*") THEN "Russian"

WHEN REGEXP_MATCH( Language , "pt.*") THEN "Portuguese"

WHEN REGEXP_MATCH( Language , "zh.*") THEN "Chinese"

WHEN REGEXP_MATCH( Language , "ar.*") THEN "Arabic"

WHEN REGEXP_MATCH( Language , "fr.*") THEN "French"

WHEN REGEXP_MATCH( Language , "vi.*") THEN "Latvian"

WHEN REGEXP_MATCH( Language , "Engli.*") THEN "English"

WHEN REGEXP_MATCH( Language , "Spanish.*") THEN "Spanish"

WHEN REGEXP_MATCH( Language , "Brazil.*") THEN "Brazilian Portuguese"

WHEN REGEXP_MATCH( Language , "Chine.*") THEN "Chinese"

WHEN REGEXP_MATCH( Language , "Russi.*") THEN "Russian"

WHEN REGEXP_MATCH( Language , "Italia.*") THEN "Italian"


ELSE "Language"


END

Installation

Go to your data studio report and click edit.

Click Resource link, then “Manage Added Data Sources”.

Click edit next to your Google Analytics

Click Add Field

Name your field what you want

Paste any of the codes above into the Formula box.

Save

Now select your new field as a Dimension.

Now you can have a lot of fun with these, and you can learn a lot about your current audience and get more.

I use this on my new car page. You can make a used car page as well.

I can select just F-150s. The data will all change.

These are all the sources helping me send engaged F-150 shoppers to my website. I can also see that 22% are in the Chevrolet Audience. Are they comparing F-150s to Silverados? I’m thinking of conquesting now.

Start using data studio and you’ll never have to login to Google Analytics again, and you will never have to make a segment again.

You may have to add some languages and brand audiences depending on your region.

Have fun! Feel free to message me with new lines to add. There are a lot of audiences and you may find yours missing.