Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Commit

Permalink
Add Google Analytics to site and cache bust resources
Browse files Browse the repository at this point in the history
  • Loading branch information
aikar committed Sep 27, 2018
1 parent 7642cca commit 03f0e33
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
9 changes: 5 additions & 4 deletions src/community.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
<meta name="theme-color" content="#1886cd">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,700" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/materialize.min.css?cacheID=vendor1" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css?cacheID=1" media="screen,projection"/>
<script type="text/javascript" src="js/materialize.min.js?cacheID=vendor1"></script>
<script type="text/javascript" src="js/site.js?cacheID=1" async="async"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
Expand Down Expand Up @@ -85,6 +87,5 @@ <h5 class="white-text">Paper</h5>
</div>
</div>
</footer>
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>
</html>
11 changes: 6 additions & 5 deletions src/downloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
<meta name="theme-color" content="#1886cd">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,700" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/materialize.min.css?cacheID=vendor1" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css?cacheID=1" media="screen,projection"/>
<script type="text/javascript" src="js/materialize.min.js?cacheID=vendor1"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script type="text/javascript" src="js/downloads.js?cacheID=1"></script>
<script type="text/javascript" src="js/site.js?cacheID=1" async="async"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
Expand Down Expand Up @@ -156,8 +160,5 @@ <h5 class="white-text">Paper</h5>
</div>
</div>
</footer>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<script type="text/javascript" src="js/downloads.js"></script>
</body>
</html>
10 changes: 5 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
<meta name="theme-color" content="#1886cd">

<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Roboto:400,700" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/materialize.min.css?cacheID=vendor1" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/papermc.css?cacheID=1" media="screen,projection"/>
<script type="text/javascript" src="js/materialize.min.js?cacheID=vendor1"></script>
<script type="text/javascript" src="js/site.js?cacheID=1" async="async"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
Expand Down Expand Up @@ -123,7 +125,5 @@ <h5 class="white-text">Paper</h5>
</div>
</div>
</footer>

<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>
</html>
8 changes: 8 additions & 0 deletions src/js/site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-126555192-1');
var gtmJS = document.createElement('script');
gtmJS.setAttribute('src','https://www.googletagmanager.com/gtag/js?id=UA-126555192-1');
document.head.appendChild(gtmJS);

0 comments on commit 03f0e33

Please sign in to comment.