Author Topic: error when write piwik tracking-code into the html template  (Read 2826 times)

Offline andreas.burmann

  • Newcomer
  • *
  • Posts: 6
    • View Profile
error when write piwik tracking-code into the html template
« on: February 28, 2012, 05:24:49 AM »
Hi,

I use the html exporter and just done my own template. Everything works well, but when I try to write down the tracking-code for piwik an error occurs.

Here is the javascript I want to put between the <body> </body> of the template:

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://subdomain.exampledomain.com/" : "http://piwik.exampledomain.com/");
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://piwik.exampledomain.com/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->


I have no idea, why photomechnic can't generate the html-Gallery.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: error when write piwik tracking-code into the html template
« Reply #1 on: February 28, 2012, 06:21:17 AM »
Hi,

I use the html exporter and just done my own template. Everything works well, but when I try to write down the tracking-code for piwik an error occurs.

Here is the javascript I want to put between the <body> </body> of the template:

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://subdomain.exampledomain.com/" : "http://piwik.exampledomain.com/");
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://piwik.exampledomain.com/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
<!-- End Piwik Tracking Code -->


I have no idea, why photomechnic can't generate the html-Gallery.

Can you post or send me the entire template you've created so I can try it myself?  If you wish to send it to me privately, click on my name to the left of this message and then click on the 'personal message' link.

Thanks,

-Kirk