Default Page Setting

Have you noticed multiple index pages showing up in your content reports? By default your website's homepage will be reported by Google Analytics as / in the top content and drill-down reports. But depending on how your website is coded you may also see /index.html, /home.html, /index.php, /index.aspx, /default.aspx or similar showing up in your content reports.

The straight forward slash will likely have the most number of pageviews, this is because most people will go directly to your website domain (or link directly to your website domain). For example http://www.yoursite.com/ and this will be reported at / in the content reports.

Then sometimes the physical page (e.g. http://www.yoursite.com/index.html) is found by a visitor. This might be because your menu or a page links directly to the /index.html page.

website

website

So what you will find is / and /index.html (or .php, .aspx, etc.) showing up in your content reports. This is duplicating the same page, so what you need to do is to set this within Google Analytics so that the duplication is removed.

This can be done by finding your physical page for your website's homepage. Start by navigating to 'Content' and then 'Top Content' and in the filter field at the bottom of the report enter ^(/(index|default|home)?.?(html|htm|php|asp|aspx|jsp)?)$ (this will check for the most common default pages). If you don't find the physical page, you might be lucky and your website has been setup to keep this hidden, but check with your web developer to be sure.

index_v2

index_v2

Setting_001

Setting_001

Setting_003

Setting_003

Once you have found the physical page you can enter it into the settings for your profile. From the account overview page click on 'edit' in the row for the profile you would like to setup. Then click 'edit' to set your website's default page and enter the name of the appropriate physical page and you are done. From setup moving forward Google Analytics will aggregate the pages together and stop the duplication showing up in your content reports.

What if you have two default pages? For example, if you see /, /index.aspx and /default.aspx in the top content pages you can also merge these into one using a search and replace filter.

index_three

index_three

Filter_001

Filter_001

Filter_002_v2

Filter_002_v2

Click on 'edit' for the particular profile on the account overview page and then on the filter panel click on 'add filter'. Name the filter, select 'custom filter' as the filter type and select 'search and replace'. Select 'request URI' as the filter field and enter ^(/|/default.aspx)$ in the search string (this will look for / and /default.aspx). Then in the replace string enter /index.aspx and save the filter. Moving forward you will just see /index.aspx as your homepage in the top content reports.