phaidon / Piwik

Piwik module for Zikula
8 stars 2 forks source link

Option to use jQuery to include the tracking code #13

Closed Portugao closed 11 years ago

Portugao commented 11 years ago

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.

phaidon commented 11 years ago

Is there an error in the javascript console?

Portugao commented 11 years ago

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...

Portugao commented 11 years ago

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>

phaidon commented 11 years ago

Can we close the issue?

Portugao commented 11 years ago

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

phaidon commented 11 years ago

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

@lmm-git

Portugao commented 11 years ago

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/

phaidon commented 11 years ago

@Portugao Thanks

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

lmm-git commented 11 years ago

I will look at it in the next days

Portugao commented 11 years ago

Great!