3

I've got two index.html files for different subdomains (www. and gametimer.smartersoftware.de). I have enabled sub-domain tracking in Google Analytics and posted the corresponding script.

However, I only see index.html, apparently for both files. I would like to be able to distinguish between the two. What do I have to change to enable that?

1
  • 1
    Are the page titles different? You can view the analytics by page title if they are to differentiate them. Commented Feb 1, 2013 at 21:46

2 Answers 2

4

The easiest way to do this, if the page titles are different, would be to view the analytics by 'page title' instead of by 'page'.

1

Well you should be able to tell what ones are different from hovering over them, personally I'd remove index.html all together and just have / as the root.

You can remove index.html so it appears as domainname.com/ by editing the htaccess file.

Add the below code if this solution works for you.

RewriteEngine On # remove this, if you have it already

RewriteCond %{REQUEST_URI} index\.html
RewriteRule ^(.*)index\.html$ /$1/ [R=301,L]

Alternatively you could make visitors go to /site1.html and /site2.html using the redirect in the htaccess but to be honest for the sake of Analytics its rather silly since your adding a redirect on a site which some people don't like and it adds some render time on the page.

1
  • Maybe my question was a bit muddy: I'm seeing only one index.html in the list - showing the sum of both files. I'm not sure how rewriting the URLs is going to change that.
    – Thorsten
    Commented Feb 2, 2013 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.