add analytics #4

Merged
ericfawcett merged 1 commits from add-analytics into master 2021-10-17 23:13:46 -04:00
2 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
<?php <?php
$config = [ $config = [
'page_title' => 'Route 8 - Stow' //html page title 'page_title' => 'Route 8 - Stow' //html page title
]; ];
@ -11,4 +12,7 @@ $camList = [ //list of cam titles and urls - currently must be 6
['Barlow Rd', 'https://itscameras.dot.state.oh.us/images/CLE/CLE044-L.jpg'], ['Barlow Rd', 'https://itscameras.dot.state.oh.us/images/CLE/CLE044-L.jpg'],
['SR 303', 'https://itscameras.dot.state.oh.us/images/CLE/CLE013-L.jpg'] ['SR 303', 'https://itscameras.dot.state.oh.us/images/CLE/CLE013-L.jpg']
]; ];
$analytics_id = "f555d43e-3a6b-4960-b356-e389fb67dbac"; //for use with ping.ericfawcett.com
?> ?>

View File

@ -12,6 +12,7 @@ require("config.php");
var camList = <?=json_encode($camList, JSON_UNESCAPED_SLASHES);?>; var camList = <?=json_encode($camList, JSON_UNESCAPED_SLASHES);?>;
</script> </script>
<script src="script.js"></script> <script src="script.js"></script>
<?=($analytics_id != '') ? "<script async src='https://ping.ericfawcett.com/pong.js' data-ackee-server='https://ping.ericfawcett.com' data-ackee-domain-id='$analytics_id'></script>":''; ?>
</head> </head>
<body> <body>
<div class="grid-container"> <div class="grid-container">