I have an intranet that is accessed by local users on
http://intranet
and users around the country on
http://intranet.ourdomain.com
Users viewing the intranet from the external URL
http://intranet.ourdomain.com
have their activity tracked but those trying to access the intranet via
http://intranet
don't
I have tested it using a computer on the internal network and the machine can access:
http://www.google-analytics.com/ga.js
http://www.google-analytics.com/__utm.gif
https://ssl.google-analytics.com/ga.js
https://ssl.google-analytics.com/__utm.gif
With no issues, and also if the machine navigates to http://intranet.ourdomain.com then that activity is tracked.
Anyone have any ideas why it is not tracking
http://intranet
connections.
NOTE: The tracking info is setup with:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
_gaq.push(['_setDomainName', 'ourdomain.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google- analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Is it actually possible to track
http://intranet ???
To solve this I did as @nwellnhof suggested and set
'_setDomainName', 'none'
I also then add a filter to show the full URI in order to separate out the different environments. I got the filter info from here http://www.annielytics.com/how-to-add-a-hostname-filter-in-ga/