Fix Piwik URL

* closes #49
This commit is contained in:
Nicola Tarocco 2020-12-07 21:50:52 +01:00
parent 7be99d9494
commit a8f8b94414
2 changed files with 26 additions and 24 deletions

View file

@ -2,7 +2,7 @@
## Applications
### COVID Calculator
### COVID Calculator
A risk assessment tool which simulates the long range airborne spread of the
SARS-CoV-2 virus for space managers.
@ -61,8 +61,8 @@ The https://cern.ch/cara application is running on CERN's OpenShift platform. In
### Updating the test-cara.web.cern.ch instance
We have a replica of https://cara.web.cern.ch running on http://test-cara.web.cern.ch. Its purpose is to simulate what will happen when
a feature is merged. To push your changes to test-cara, simply push your branch to live/test-cara and the CI pipeline will trigger the
deployment. To push a to this branch, there is a good chance you will need to force push - you should always force push with care and
a feature is merged. To push your changes to test-cara, simply push your branch to `live/test-cara` and the CI pipeline will trigger the
deployment. To push to this branch, there is a good chance that you will need to force push - you should always force push with care and
understanding why you are doing it. Syntactically, it will looks something like (assuming that you have "upstream" as your remote name,
but it may be origin if you haven't configured it differently):

View file

@ -1,37 +1,39 @@
if (document.location.hostname == "test-cara.web.cern.ch") {
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
var u = "//piwikui.web.cern.ch/piwikui/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '7615']);
var u = "//piwik.web.cern.ch/";
_paq.push(["setTrackerUrl", u + "piwik.php"]);
_paq.push(["setSiteId", "7615"]);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.type = "text/javascript";
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
g.src = u + "piwik.js";
s.parentNode.insertBefore(g, s);
})();
} else if (document.location.hostname == 'cara.web.cern.ch') {
} else if (document.location.hostname == "cara.web.cern.ch") {
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function () {
var u = "//piwikui.web.cern.ch/piwikui/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '7616']);
var u = "//piwik.web.cern.ch/";
_paq.push(["setTrackerUrl", u + "piwik.php"]);
_paq.push(["setSiteId", "7616"]);
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g = d.createElement("script"),
s = d.getElementsByTagName("script")[0];
g.type = "text/javascript";
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
g.src = u + "piwik.js";
s.parentNode.insertBefore(g, s);
})();
} else {
console.log("Usage tracking disabled for hostname: " + document.location.hostname);
}
console.log(
"Usage tracking disabled for hostname: " + document.location.hostname
);
}