Skip to content
Extraits de code Groupes Projets
Valider e6e1b80e rédigé par Fabian Becker's avatar Fabian Becker
Parcourir les fichiers

Fix wrong tracking tag when piwik is hosted in a subdirectory.

parent db60c80d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -9,7 +9,8 @@
$(document).ready(function() {
var piwikHost = window.location.host;
var piwikHost = window.location.host,
piwikPath = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
//
// utility methods
......@@ -228,7 +229,7 @@ $(document).ready(function() {
result += ' _paq.push(["trackPageView"]);\n\
_paq.push(["enableLinkTracking"]);\n\n\
(function() {\n\
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://' + piwikHost + '/";\n\
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://' + piwikHost + piwikPath + '/";\n\
_paq.push(["setTrackerUrl", u+"piwik.php"]);\n\
_paq.push(["setSiteId", ' + JSON.stringify(idSite) + ']);\n\
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";\n\
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter