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:


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.


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


You can also use a short method like

  • 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

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


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


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.