phaidon/Piwik

Option to use jQuery to include the tracking code

Portugao opened this issue · 10 comments

I have the issue, that the tracking code is a problem for simple jquery code; for example in MUBoard the preview does not work if piwik is enabled.

I don't know if it is possible to fix that in MUBoard. At this moment I have no idea.

Is there an error in the javascript console?

No, I don't think so. I could not find any error message that seems to depend on that problem.
The preview is shown 1 second and then the site try to reload or something like that.

During the reload, if it is one, in the DOM view of firebug I get informations about piwik...

Very strange...

I took the actual tracker code and the issue is gone:

<!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; (function(){ var u=(("https:" == document.location.protocol) ? "https://{$PIWIK_URL}/" : "http://{$PIWIK_URL}/"); _paq.push(['setSiteId', {$IDSITE}]); _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); 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>

Can we close the issue?

Yes and another one should or could be to include the actual tracking code, I think.

What do you mean with "actual tracking code" where do have it from?

@lmm-git

The code above. It looks different from the code the module piwik set into the footer.

I got the code above from:
http://piwik.org/docs/javascript-tracking/

@Portugao Thanks

@lmm-git Can you have look at this. I think your are more familiar with the current status of the code. Thanks

I will look at it in the next days

Great!