use piwik on plain http pages only to prevent ssl warning

svn path=/trunk/; revision=25707
This commit is contained in:
paul 2013-06-13 12:58:05 +00:00
parent b4066961d0
commit 0cd7ed817a
1 changed files with 11 additions and 3 deletions

View File

@ -1066,9 +1066,17 @@
<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.fsfe.org/" : "http://piwik.fsfe.org/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
// uncommented by paul to prevent ssl warning
//var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.fsfe.org/" : "http://piwik.fsfe.org/");
//document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
//enable piwik on plain text page only
pkBaseURL = "http://piwik.fsfe.org/");
if ("http:" == document.location.protocol) {
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", 4);
piwikTracker.trackPageView();