Skip to content
Snippets Groups Projects
Commit 38635c64 authored by CDuv's avatar CDuv
Browse files

Adds quotes to Matomo/Piwik website ID

When using Matomo/Piwik integration, only integer website IDs can be used.
If using the "Protect Track ID" Matomo plugin (https://plugins.matomo.org/ProtectTrackID), website IDs are strings which the "_piwik.html.haml" layout file does not supports because it assumes "extra_config.piwik_site_id" variable contains an integer and prints it to JavaScript code without quotes.

This commits surrounds "extra_config.piwik_site_id" variable with double quotes (") so that it works with both integers and strings.

Issue: #61606
parent 7a3a1c2f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -7,7 +7,7 @@
(function() {
var u="//#{extra_config.piwik_url}/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', #{extra_config.piwik_site_id}]);
_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);
})();
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment