I just updated the doc page.
You should call all the other setup methods (setTrackerUrl, setSiteId) before trackPageView as well. If your code really works, I'd be surprised.
Try it like this
You should call all the other setup methods (setTrackerUrl, setSiteId) before trackPageView as well. If your code really works, I'd be surprised.
Try it like this
<script> var _paq = _paq || []; (function() { var u=(("https:" == document.location.protocol) ? "https" : "http") + "://" + piwikurl +/; _paq.push(["setTrackerUrl", u+"piwik.php"]); _paq.push(["setAPIUrl", apiUrl]); _paq.push(["setSiteId", "#"]); _paq.push(["trackPageView"]); _paq.push(["enableLinkTracking"]); 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>