In the latest episode of our ‘Calling Kevin’ video series, we show you how to clean up and filter URLs using a few simple expressions in Looker Studio.
By applying these Regular Expressions (RegEx), you can easily remove duplicates, fix casing issues, and tidy up troublesome URL data to standardise GA4 reporting – just as you would have been able to in Universal Analytics.
Expressions used:
- To remove parameters from a page path: REGEXP_EXTRACT(Page, “^([\\w-/\\.]+)\\??”)
- To remove trailing slash from a page path: REGEXP_REPLACE(Page, “(/)$”, “”)
- To make a page path lowercase: LOWER()
Combined: LOWER(REGEXP_REPLACE(REGEXP_EXTRACT(Page path + query string, “^([\\w-/\\.]+)\\??”), “(/)$”, “”))
For more quick GA4 tips, be sure to check out other videos from our ‘Calling Kevin’ series.
To find out how Lynchpin can help
About the author
Kevin Thomson
After graduating in 2001 with a degree in Computing Science, Kevin started his career as a software developer before branching into Digital Marketing and eventually specialising in Analytics – where he has experience working both client and agency-side.
In the last two years of his almost five years at Lynchpin, Kevin's primary role has been implementing new GA4 platforms for clients and migrating GA3 platforms to GA4. Beyond this, Kevin’s breadth and depth of experience allows him to cover reporting, engineering, and much more across the Lynchpin team.
Outside work, you will find Kevin making sourdough bread, walking his adorable Cocker Spaniel called Luna, running, making music, and looking after his three children.