Google Analytics: How To Replace %20 With A Space

I recently wrote a post entitled Tracking Keyword Ranking Position with Google Analytics which demonstrated how you can produce a report using filters and custom variables that will show precisely where your page is ranking for a particular keyword for users referred via Google search results.

One of the downfalls to the approach outlined in the previous article is that the keyword reports produced by the filters display %20 instead of spaces in the User Defined Value, as shown in the following screenshot:

User Defined Value Showing %20 Instead Of Spaces

My first reaction was to try and create a Search and Replace filter in the Google Analytics profile, but Google does not allow you to enter a single space in the Replace String field, instead treating that field as being empty. Other people recommend using an underscore instead of a space as the replacement character.

The solution is to use a non-breaking space (Option+Space on OSX, or Alt+0160 on Windows). The only other issue is that the filters will only replace once instance of %20 with a space, so you’ll need to create several (I usually create five or six and call it a day).

Creating A Filter To Replace %20 With A Space

After you make this change, note that it will take a few days to start seeing it take effect. Here’s a screenshot with the updated filters in place, also notice that I’ve put the rank information at the front of the user defined field so that it is always visible.

User Defined Value Showing Non-Breaking Space Instead Of %20

Chris Abernethy
PHP Wrangler, MySQL DBA, Linux SysAdmin and all around computer guy, developing LAMP applications since Slackware came on 10 floppy disks.

One Comment on "Google Analytics: How To Replace %20 With A Space"

  1. At this time I am ready to do my breakfast, when having my breakfast coming over again to read further news.

Got something to say? Go for it!