Google Analytics Sub Domain Tracking Jinxed?

Buongiorna from 16 degrees C Wetherby UK :slight_smile:

I’m trying to de bug sub domain tracking for a belgium site. I beleive the balls up has occured due to how the sub domain tracking was configured. So below is what i think is wrong and what i think is right.

Parent site:www.lewispr.be

Sub domain sies:

http://fr.lewispr.be/
http://nl.lewispr.be/
http://en.lewispr.be/


Wrong

http://fr.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘fr.lewispr.be’]);
_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>

http://nl.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘lewispr.be’]);
_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>

http://en.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘en.lewispr.be’]);
_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>

Right

http://fr.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘.lewispr.be’]);
_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>

http://nl.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘.lewispr.be’]);
_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>

http://en.lewispr.be/

<script type=“text/javascript”>
var _gaq = _gaq || ;
_gaq.push([‘_setAccount’, ‘UA-17951587-15’]);
_gaq.push([‘_setDomainName’, ‘.lewispr.be’]);
_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>

So my question is please: “Should tweaking the code as in the code snippets under right trigger correct sub domain tracking”

Grazie tanto,
David