Clean Up Your (not-set) Campaign Data With This Easy Case Statement

Most dealer brands have some type of PPC that is endorsed and recommended by OEMs. Many Ford Dealers have a Ford Direct Campaign running, and General Motors Dealers will have a CDK Campaign running.

The issue is the Google Ads account typically isn’t connected to your Google Analytics account. So if you have your own campaigns connected and you’re using auto tagging, the source/medium will be google / cpc. The “not set” campaigns will also be nestled under this source / medium.

So here’s a super easy case statement for Google Data Studio that will fix that for you to avoid confusion when looking at this data in a high level.

CASE
WHEN Source / Medium = "google / cpc" AND Campaign = "(not set)" THEN "Ford Direct CPC"
WHEN Source / Medium = "google / cpc" THEN "Google CPC"
WHEN REGEXP_MATCH(Source / Medium, "GMB listing / organ.*") THEN "Google My Business"
WHEN REGEXP_MATCH(Source / Medium, "TMP.*") THEN "TMP"
WHEN Source / Medium = "edmunds / cpc" THEN "Edmunds Paid Ads"
WHEN REGEXP_MATCH(Source / Medium, "google / organ.*") THEN "Google Organic"
ELSE Source / Medium
END

Now that data will look like this:

The “ELSE” will include all other source/medium referrals. You can use regex as well. I used it in the example just as an FYI (I didn’t have to).

You can rename these to anything you want after the “THEN” statement.

Life Pro Tip: If you are running in-house campaigns or having a vendor do them for you, be sure you inspect the landing pages from the “not set” campaigns. It’s pretty easy to figure out what they are doing, so don’t get in a bidding war with keywords they are bidding on. All sources should work as a team to bring success to the dealer.