Skip to content

Commit 2fb8760

Browse files
committed
Add Cloudflare Web Analytics beacon (production origin only)
1 parent 742d2f8 commit 2fb8760

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lobby_worker/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,5 +230,15 @@ <h1 class="game-title">PONGO</h1>
230230
</div>
231231
<script type="module" src="pwa.js"></script>
232232
<script type="module" src="script.js"></script>
233+
<!-- Cloudflare Web Analytics: anonymous visit counts, production origin only. -->
234+
<script>
235+
if (location.hostname.endsWith("tre.systems")) {
236+
const beacon = document.createElement("script");
237+
beacon.defer = true;
238+
beacon.src = "https://static.cloudflareinsights.com/beacon.min.js";
239+
beacon.setAttribute("data-cf-beacon", '{"token": "893eaee1dc1d46109119d2b54cdf023e"}');
240+
document.head.appendChild(beacon);
241+
}
242+
</script>
233243
</body>
234244
</html>

0 commit comments

Comments
 (0)