Skip to content

Commit ccb8fbb

Browse files
committed
Add cloudflare analytics
1 parent 8a51c06 commit ccb8fbb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

etc/config.sample.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"analytics": {
3+
"cloudflare": null,
4+
},
25
"bnetdocs": {
36
"asset_versioning": true,
47
"campaigns": {

src/templates/footer.inc.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ and/or other countries.
2222
</p>
2323
</footer>
2424
<?php echo Logger::getTimingFooter(); ?>
25+
<?php if (Common::$config->analytics->cloudflare) { ?>
26+
<!-- Cloudflare Web Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js" data-cf-beacon='{"token":<?=json_encode(Common::$config->analytics->cloudflare)?>}'></script><!-- End Cloudflare Web Analytics -->
27+
<?php } ?>
2528
</body>
2629
</html>

0 commit comments

Comments
 (0)