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:

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).

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.




Hi,
What exactly do you mean with this:
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).
I also have the profile which creates tons of %20 and I have been searching for a way to get rid of it…….
Thanks
Unfortunately, the Search and Replace filter does not do a “replace all”, so you’ll need to duplicate it for each %20 that you want to replace. I duplicate the filter 5 or 6 times, and just deal with additional %20 when they show up in the keywords.
I find that in most cases, there are fewer than five occurrences of “%20″ in the keywords. Depending on what keywords you are targeting, i.e., if you are ranking for some really long-tail kind of stuff, you may need to make more copies of the filter.
Thanks for the great feedback, Chris.
I’m assuming this filter doesn’t work backwards.
The problem is, if i get traffic from, let’s say, 400 keywords, in a period of 3 or 4 days, than 90% of those keywords are long tail.
I’d be needing lots of these filters i guess :( to filter out the %20
Hi Chris,
Thanks for your previous post on “Tracking Keyword Ranking Position with Google Analytics”. I’m new at GA. would this new filter be placed at the bottom of the stack of as per your previous post?
Hi and thank you for this!
I tried typing in alt+0160 to get the space but nothing happened and therefore the filter would not be saved.
Do you have any insights on how I should fix this?
Thanks!
NewtoGA,
Hold ALT and the type in the numbers on the right side number pad on your keyboard. If using a laptop with no numberpad, you might have to use the Fn+Alt+0160.
Hth
hey,
I’m having problems getting Analytics to save my custom filter when entering option+space on OSX. Nothing happens when trying to save the filter, so I might be doing something wrong.
Any help with this will be highly appreciated!
@Rasmus
The reason that you might be having problems with the filter is because your are using Google Analytics V5 which still got some issues. The trick is to change the GA interface to the “Old” version, create the filter with the hard space (remember you can change the “Filter Field” when you switch back to the new interface, e.g. use the new fields like Event Label ). Then switch back to the new version of GA change the “Filter Field” (if necessary) and hit the save button. This should keep the hard space in the replace field.
Hopefully this should do the trick :)