1

I want to have a report (in Google Data Studio) showing a list of URLs to see how they improved over time.

I thought I could escape my URLs and then use a list like:

\/blog|\/other-page|\/yet-another-page

Those are just examples, pages could contain a variety of characters which would possibly need to be escaped.

Is there a way to escape all characters for Google Analytics? Or do you have to do each one individually? I have a lot of URLs in this particular case as I am updating a lot of meta titles and descriptions. So I want to see how they compare to previous periods after the change.

2

You don't need to escape the "/" cause it's not a special character. So, your code would be:

/blog|/other-page|/yet-another-page

You can also use a short method like

^/(blog|other-page|yet-another-page)
  • I thought anything non-alphanumeric would need to be escaped. – Eoin Sep 5 '18 at 15:49
  • Even so, same question, as some of the items defo have things in there that would need to be escaped. Is there a shorter way to do the escaping? – Eoin Sep 5 '18 at 16:50
0

I figured the best way, if you already know the URLs, which I get from Excel on this occasion is to put them all into one place and then use a tool like this

https://www.regex-escape.com/regex-escaping-online.php

Which says:

Which regex-characters must be escaped? Special characters in regular expressions which have to be escaped are:. \ + * ? [ ^ ] $ ( ) { } = ! < > | : -

Using the below sentance which incorporates all of the items I can test it

eoin-oliver\is+a*wonderful?person[I^think]we$can(all)agree{somewhat}=to!a<god>or|oxymoron:nice

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.