Cleaning Campaign Names

Marketing Analytics in Google Sheets

Luke Pajer

Digital Marketing Specialist

Recall: REGEXMATCH()

=REGEXMATCH(`string to test`, `regular expression`)

Filter tables

=FILTER(range, REGEXMATCH(string to test, regular expression))

Aggregate by categories

=SUM(FILTER(range, REGEXMATCH(string to test, regular expression)))
=AVERAGE(FILTER(range, REGEXMATCH(string to test, regular expression)))
Marketing Analytics in Google Sheets

Recall: REGEXREPLACE()

Used to replace a portion of a string

=REGEXREPLACE(string, regular expression, replacement string)

To replace only a certain categorical string

=IF(REGEXMATCH(test, regex), REGEXREPLACE(string, regex, replacement string), if False)
Marketing Analytics in Google Sheets

Recall: REGEXEXTRACT()

Used to extract portions of strings

=REGEXEXTRACT(`string`, `regular expression`)

To extract only a certain categorical string

=IF(REGEXMATCH(test, regex), REGEXEXTRACT(string, regex), if False)
Marketing Analytics in Google Sheets

Chapter wrap-up

  • Marketing director needs the following changes
    • The source, campaign, and ad group names to be condensed into a unique id
    • Filter and aggregate the performance metrics using the newly created id
  • Keep in mind
    • Use regular expressions to match, extract, and replace strings
    • Recall the filtering and aggregation techniques learned in this chapter
Marketing Analytics in Google Sheets

Let's get to work!

Marketing Analytics in Google Sheets

Preparing Video For Download...