I am using google analytics but it would only work for a live,hosted website.
Is there a way to let it work in localhost also.
Or is it possible to convert localhost to a url for example
_hxxx://localhost/xyz to _hxxx://mysite/xyz
Please help.
|
I am using google analytics but it would only work for a live,hosted website. Is there a way to let it work in localhost also. Or is it possible to convert localhost to a url for example _hxxx://localhost/xyz to _hxxx://mysite/xyz Please help. | |||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Presumably as your site has no domain (has no "." in it like "localhost") then you will need to set _udn="none". This way Analytics leaves out the domain portion of it's tracking cookies. Another possible way is to setDomainName("none") in GA.js syntax. This prevents Google trying set a domain= on the cookie's and this way they will not fail. Must admin i have not done this but it would seem the logical way to approach it. Analytics looks for and expects a domain and so fails when it doesn't get one. Stop it looking for one and it shouldn't fail. | |||
|
feedback
|
|
I believe you can use a host file on the IIS server and create an entry for whatever domain you want, then point it to 127.0.0.1 . | |||
|
feedback
|