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
Lynchpin
Lynchpin integrates data science, engineering and strategy capabilities to solve our clients’ analytics challenges. By bringing together complementary expertise we help improve long term analytics maturity while delivering practical results in areas such as multichannel measurement, customer segmentation, forecasting, pricing optimisation, attribution and personalisation.
Our services span the full data lifecycle from technology architecture and integration through to advanced analytics and machine learning to drive effective decisions.
We customise our approach to address each client’s unique situation and requirements, extending and complementing their internal capabilities. Our practical experience enables us to effectively bridge the gaps between commercial, analytical, legal and technical teams. The result is a flexible partnership anchored to clear and valuable outcomes for our clients.