Hi all,
I have some javascript which calls some php functions to track webstats (piwik.org)
Everything works fine on http sites, from every browser it is all tracked
I have one site that is https - it will track visits from ie, but not from Firefox or Chrome
Does anyone know of anything I need to do or set or use to make it work on an https site?
Here is the code that goes in the html - please let me know if you need anything else:
<!-- Piwik -->
<!--"http://webstats.veritythree.com";-->
<script type="text/javascript">
var pkBaseURL = "https://mysite/Webstats/";
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", 6);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->
The piwik.js is pretty large but I don't know if it will help so I will refrain from posting it for now...
I tried replacing their piwik.php with a simple file of my own that just writes a text file - this works from IE, from Firefox and Chrome it doesn't even create the file
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "V3 Developer\n";
fwrite($fh, $stringData);
$stringData = "Testing PHP\n";
fwrite($fh, $stringData);
fclose($fh);
Thanks for any help on this one!