Own subdomains listed in referer

Hi,

I have a website with lots of subdomains. These subdomains appear in the referer section. I tried a couple of things to avoid this, but had no luck so far. What am I doing wrong?

This is the tracking code I use:


	<!-- Piwik -->
	<script type="text/javascript">
	  var _paq = _paq || [];
	  _paq.push(["setCookieDomain", "*.example.tld"]);
	  _paq.push(["trackPageView"]);
	  _paq.push(["enableLinkTracking"]);

	  (function() {
		var u=(("https:" == document.location.protocol) ? "https" : "http") + "://www1.example2.tld/piwik/";
		_paq.push(["setTrackerUrl", u+"piwik.php"]);
		_paq.push(["setSiteId", "3"]);
		var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
		g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
	  })();
	</script>
	<!-- End Piwik Code -->

also call:

  _paq.push(["setDomains", "*.example.tld"]);

which should fix it!

Thanks Matt for the answer.

Unfortunately this did not help (not sure if it maybe helped a little bit). Does the order of the parameters in the JS code matter?

Is it possible that it takes a while because there are still some old cookies in use on the user side? (I have added setCookieDomain only recently).

Also the Piwik installation is on another server, may this cause a problem?

In the Piwik settings, when I added this website (Website management), the URL I have entered is example.tld. I guess when I add all subdomains here, referers are ok, but there are too many I’m using. Do I need to enter *.example.tld or something similar there?

Here is the current code.


	<!-- Piwik -->
	<script type="text/javascript">
	  var _paq = _paq || [];
	  _paq.push(["setCookieDomain", "*.example.tld"]);
	  _paq.push(["setDomains", "*.example.tld"]); 
	  _paq.push(["trackPageView"]);
	  _paq.push(["enableLinkTracking"]);

	  (function() {
		var u=(("https:" == document.location.protocol) ? "https" : "http") + "://www1.example2/piwik/";
		_paq.push(["setTrackerUrl", u+"piwik.php"]);
		_paq.push(["setSiteId", "3"]);
		var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
		g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
	  })();
	</script>
	<!-- End Piwik Code -->