Commit 4eee4bb655d4a89f2001dc3347891df8b15f9245
1 parent
86e928ba
add https or http to Piwik tracker url
make setSiteId value enclosed in double quotes for safety
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
web/piwik/CXM_piwik.anubis
| @@ -31,9 +31,9 @@ public define HTML_Head_Tag | @@ -31,9 +31,9 @@ public define HTML_Head_Tag | ||
| 31 | _paq.push(['trackPageView']); | 31 | _paq.push(['trackPageView']); |
| 32 | _paq.push(['enableLinkTracking']); | 32 | _paq.push(['enableLinkTracking']); |
| 33 | (function() { | 33 | (function() { |
| 34 | - var u=\"//" + piwik_tracker + "/\"; | 34 | + var u=((\"https:\" == document.location.protocol) ? \"https\" : \"http\") + \"://" + piwik_tracker + "/\"; |
| 35 | _paq.push(['setTrackerUrl', u+'piwik.php']); | 35 | _paq.push(['setTrackerUrl', u+'piwik.php']); |
| 36 | - _paq.push(['setSiteId', " + site_id + " ]); | 36 | + _paq.push(['setSiteId', \"" + site_id + "\" ]); |
| 37 | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | 37 | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; |
| 38 | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); | 38 | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); |
| 39 | })(); | 39 | })(); |