Skip to content

Commit 4a90557

Browse files
authored
Merge pull request #3188 from IntersectMBO/feat/3173-add-matomo-analytics-code-to-govtool-on-cardano-preprod-network
feat(#3173): add support for preprod matomo analyics
2 parents 5716c36 + 411be1f commit 4a90557

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

govtool/frontend/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
<script>
2525
var isMainnet = window.location.hostname == "gov.tools";
2626
var isPreview = window.location.hostname == "preview.gov.tools";
27+
var isPreprod = window.location.hostname == "pre-prod.gov.tools";
28+
29+
var siteId = "1";
30+
if (isPreview) {
31+
siteId = "2";
32+
} else if (isPreprod) {
33+
siteId = "4";
34+
}
2735

2836
var _paq = (window._paq = window._paq || []);
2937
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
@@ -36,7 +44,7 @@
3644

3745
var u = "//analytics.gov.tools/";
3846
_paq.push(["setTrackerUrl", u + "matomo.php"]);
39-
_paq.push(["setSiteId", isMainnet ? "1" : "2"]);
47+
_paq.push(["setSiteId", siteId]);
4048
var d = document,
4149
g = d.createElement("script"),
4250
s = d.getElementsByTagName("script")[0];

0 commit comments

Comments
 (0)