Jump to content

[solved] Where to add Piwik Code


Recommended Posts

Hi vekia and Nemo1,

 

Yes for statistics. This is my code

 

<!-- Piwik -->

<script type="text/javascript">

var _paq = _paq || [];

_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);

_paq.push(["setCookieDomain", "*.www.uniqjewelrydesigns.com"]);

_paq.push(["trackPageView"]);

_paq.push(["enableLinkTracking"]);

 

(function() {

var u=(("https:" == document.location.protocol) ? "https" : "http") + "://www.uniqjewelrydesigns.com/piwik/";

_paq.push(["setTrackerUrl", u+"piwik.php"]);

_paq.push(["setSiteId", "1"]);

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>

<!-- End Piwik Code -->

Link to comment
Share on other sites

i've noticed that it's a script, so don't forget to use {literal} {/literal} tags

 

like this:

<!-- Piwik -->
{literal}
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.www.uniqjewelrydesigns.com"]);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://www.uniqjewelrydesigns.com/piwik/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
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>
{/literal}
<!-- End Piwik Code -->

Link to comment
Share on other sites

×
×
  • Create New...