Created
March 26, 2019 21:38
-
-
Save hamletbatista/b36a2ac8900840448405510f55cf068b to your computer and use it in GitHub Desktop.
Track performance of URL group in Data Studio with a generated regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
categories = """https://www.site.com/category/name1 | |
https://www.site.com/category/name2 | |
https://www.site.com/category/name3 | |
""" | |
from urllib.parse import urlparse | |
"|".join([ urlparse(x).path for x in categories.split()]) | |
#example output: '/category/name1|/category/name2|/category/name3' | |
#create a landing page filter in Data Studio, select RegExp Contains and copy and paste the regex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment