gitlab-org--gitlab-foss/app/views/layouts/_piwik.html.haml
Stan Hu f605898191 Fix Piwik not working
Due to indentation, the changes in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31402 broke the
templating of Piwik script header.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66627
2019-08-26 15:46:14 -07:00

15 lines
712 B
Text

<!-- Piwik -->
= javascript_tag nonce: true do
:plain
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//#{extra_config.piwik_url}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', "#{extra_config.piwik_site_id}"]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
<noscript><p><img src="//#{extra_config.piwik_url}/piwik.php?idsite=#{extra_config.piwik_site_id}" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->