Piwik 1.3 only counting IE, all other browsers not


#1

Hi all,

I have installed piwik 1.3 in my webspace and successfully finished the setup steps. I copied the piwik tracking code to my website and internet explorer visits are counted. All other browsers are not counted. Do you have any idea whats wrong?

Piwik is installed below /piwik/ on my site. I have enabled only anonIP plugin, all others were enabled by default.

Can someone help, please?

Questmaster


#2

This is the tracking code I got from piwik:


<!-- Piwik --> 
 <script type="text/javascript">
 var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.xyz.xyz/piwik/" : "http://www.xyz.xyz/piwik/");
 document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
 </script><script type="text/javascript">
 try {
 var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
 piwikTracker.trackPageView();
 piwikTracker.enableLinkTracking();
 } catch( err ) {}
 </script><noscript><p><img src="http://www.ff-wallrabenstein.de/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
 <!-- End Piwik Tracking Code -->

with adding this line:


<script src='http://www.xyz.xyz/piwik/piwik.js'></script>

it works for all browsers, so the document.write(…) seems not to work properly. pkBaseURL is set correctly. But this would mean that i’m not the only one with this issue…
Any comments?

Thanks.


#3

Ok,
I can now answer my own thread, but maybe this is also interesting for others and/or the developers…

Here is the tracking code problem explained and, as far as I have tested, also solved: How to use Piwik for your website delivered by Silverstripe cms

Questmaster


(vipsoft) #4

If your site isn’t viewable via https, then you can certainly load piwik.js explicitly.

If your site is viewable via http and https, and document.write isn’t working, then check for unbalanced tags elsewhere in your page. Otherwise, use the DOM method to add a script tag to load piwik.js. There’s an example of this using the asynchronous tracking method. http://piwik.org/docs/javascript-tracking/#toc-asynchronous-tracking


#5

Hi Anton,

I used the methode described here:

I guess this is a problem in combination of silverstripe, that I use. Thanks for your comment.