How to Rename URLs in Google Analytics

Google Analytics tracking code uses the URL as it shows in the address bar of the browser. If the URL’s on your site are hard to understand then you might want to name them something more meaningful so that someone looking on Google Analytics reports can quickly understand what the pages are about.

For example:  If you have a URL that looks like

http://www.mydomain.com/p=123

It will appear as p=123 in Google Analytics Site Content –> Pages report

Just by looking at the report, you won’t know what page p=123 is about, so you might want to rename it to more meaningful URL like

http://www.mydomain.com/page-about-product.html

In order to do so, on the page http://www.mydomain.com/p=123, you change the default

_gaq.push([‘_trackPageview’]);  to  _gaq.push([‘_trackPageview’, ‘[new name of the URL]’]);

For the example above the code will be

_gaq.push([‘_trackPageview’, ‘page-about-product.html’]);

Now you will see page-about-product.html instead of p=123 in Google Analytics Site Content –>Pages Report

(Note if you rename a page then the functionality to click through on a URL to visit the page will be broken as well as In-Page Analytics will be broken).

4 thoughts on “How to Rename URLs in Google Analytics”

    1. Yes, as long as you rename it to index.html. You can also use a filter to fix this issue, I will write about that in another post.

Leave a Reply

Your email address will not be published. Required fields are marked *