Commit bc5cda793a97376458fd42dcd0170c5f072289e9
1 parent
2ef405e3
Exists in
master
and in
2 other branches
Set site id for production and staging environments
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
js/piwik.js
@@ -3,7 +3,10 @@ define(['piwik'], function(){ | @@ -3,7 +3,10 @@ define(['piwik'], function(){ | ||
3 | var _paq = _paq || []; | 3 | var _paq = _paq || []; |
4 | _paq.push(["trackPageView"]); | 4 | _paq.push(["trackPageView"]); |
5 | _paq.push(["enableLinkTracking"]); | 5 | _paq.push(["enableLinkTracking"]); |
6 | - | 6 | + |
7 | + var isProduction = /^http:\/\/dialoga\.gov\.br\//.test(window.location.href); | ||
8 | + var siteId = isProduction ? 65 : 1; | ||
9 | + | ||
7 | (function() { | 10 | (function() { |
8 | var u="http://estatisticas.dialoga.gov.br/"; | 11 | var u="http://estatisticas.dialoga.gov.br/"; |
9 | _paq.push(["setTrackerUrl", u+"piwik.php"]); | 12 | _paq.push(["setTrackerUrl", u+"piwik.php"]); |