Skip to content

Commit

Permalink
Add cloudflare analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Dec 27, 2020
1 parent 8a51c06 commit ccb8fbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/config.sample.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"analytics": {
"cloudflare": null,
},
"bnetdocs": {
"asset_versioning": true,
"campaigns": {
Expand Down
3 changes: 3 additions & 0 deletions src/templates/footer.inc.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ and/or other countries.
</p>
</footer>
<?php echo Logger::getTimingFooter(); ?>
<?php if (Common::$config->analytics->cloudflare) { ?>
<!-- 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 -->
<?php } ?>
</body>
</html>

0 comments on commit ccb8fbb

Please sign in to comment.