Reputation: 21
I'm using Google Data Studio to create a dashboard for my Google Analytics data.
I'm trying to find the number of users visiting a Page
, so I used Regex as seen:
But instead I got 2 urls (trailing slash & non-trailing slash) - screenshot:
Leading me to...
My 2 questions:
Upvotes: 2
Views: 2462
Reputation: 97
If you have unique page titles for the pages in question, you can use that dimension instead of using page and creating a regex replace fx to combine into one. Using page titles also combines data for 1 URL with different parameters.
Upvotes: 1
Reputation: 491
You could create a new dimension and use REGEXP_REPLACE
to remove the trailing slashes.
REGEXP_REPLACE(Page,"/$","")
Upvotes: 1
Reputation: 6471
It can be achieved by using the REGEXP_REPLACE
Calculated Field below (which removes the last /
(trailing forward slash) when it's present):
REGEXP_REPLACE(Page, "(/)$", "")
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:
Upvotes: 6