Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 13117

Piwik on subdomain don't record data

$
0
0
Hi all, I need some help! I used piwik in some site installed on the mail domain and all works fine.
Now I created a new-separated-site (a wordpress one) in a subdomain, aaa.domain.it and I want to record data, but doesn't work!

My piwik js, inserted in the footer.php file, so I'm sure that it's correct in the html output:

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

(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://aaa.domain.it/piwik/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
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 -->

Can somebody help me to understand what's wrong?

Thank you!

Viewing all articles
Browse latest Browse all 13117

Trending Articles