Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeg committed Aug 13, 2024
1 parent 24311c9 commit fcae50d
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 36 deletions.
3 changes: 2 additions & 1 deletion views/admin.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<%- include('partials/gtm_head') %>
<title>Match Room Admin</title>
<link rel="stylesheet" type="text/css" href="/views/tetris.css" />
<style>
Expand Down Expand Up @@ -121,7 +122,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>
<p>Player link:<br /><a id="player_link">-</a></p>

<div class="box">
Expand Down
7 changes: 2 additions & 5 deletions views/intro.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<%- include('partials/gtm_head') %>
<title>NestrisChamps: Capture your NES Classic Tetris gameplay</title>
<meta name="description" content="NestrisChamps: capture NES Classic Tetris data and see awesome stats. Record all your games. See your progression. Play with friends and organise tournaments!" />

<meta property="og:url" content="https://nestrischamps.io/" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://nestrischamps.io/views/1p/das_trainer.jpg" />
Expand Down Expand Up @@ -46,7 +43,7 @@
}
</script>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
6 changes: 2 additions & 4 deletions views/link.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<%- include('partials/gtm_head') %>
<title>NestrisChamps: Login with Twitch</title>
<meta name="description" content="Login to access NestrisChamps tracking features" />

Expand All @@ -14,7 +12,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
6 changes: 2 additions & 4 deletions views/login.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<%- include('partials/gtm_head') %>
<title>NestrisChamps: Login with Twitch</title>
<meta name="description" content="Login to access NestrisChamps tracking features" />

Expand All @@ -14,7 +12,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
2 changes: 2 additions & 0 deletions views/partials/gtm_body.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PPLG9BMW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
7 changes: 7 additions & 0 deletions views/partials/gtm_head.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PPLG9BMW');</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
6 changes: 2 additions & 4 deletions views/privacy.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<%- include('partials/gtm_head') %>
<title>NesTrisChamps: Privacy</title>
<meta name="description" content="Login to access NestrisChamps tracking features" />

Expand All @@ -14,7 +12,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
3 changes: 2 additions & 1 deletion views/profile_card.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<%- include('partials/gtm_head') %>
<style>
@font-face {
font-family: 'Gotham';
Expand Down Expand Up @@ -118,7 +119,7 @@ p {
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<div class="frame">
<section id="name">
Expand Down
5 changes: 2 additions & 3 deletions views/progress.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%- include('partials/gtm_head') %>
<title>NestrisChamps: user settings</title>
<link rel="stylesheet" href="/vendor/bulma.1.0.2.min.css">

Expand Down Expand Up @@ -59,7 +58,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
5 changes: 2 additions & 3 deletions views/renderers.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%- include('partials/gtm_head') %>
<title>NestrisChamps: renderers</title>
<link rel="stylesheet" href="/vendor/bulma.1.0.2.min.css">
<style>
Expand All @@ -22,7 +21,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
5 changes: 2 additions & 3 deletions views/scores.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%- include('partials/gtm_head') %>
<title>NestrisChamps: user settings</title>
<link rel="stylesheet" href="/vendor/bulma.1.0.2.min.css">
<style>
Expand All @@ -19,7 +18,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
5 changes: 2 additions & 3 deletions views/settings.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%- include('partials/gtm_head') %>
<title>NestrisChamps: user settings</title>
<link rel="stylesheet" href="/vendor/bulma.1.0.2.min.css">
<style>
Expand Down Expand Up @@ -41,7 +40,7 @@
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down
7 changes: 2 additions & 5 deletions views/terms.ejs
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<%- include('partials/gtm_head') %>
<title>NesTrisChamps: Terms of Service</title>
<meta name="description" content="Login to access NestrisChamps tracking features" />

<link rel="stylesheet" href="/vendor/bulma.1.0.2.min.css">
<style>
.navbar-item img {
max-height: 2.5rem;
}
</style>
</head>
<body>
<body><%- include('partials/gtm_body') %>

<%- include('header'); %>

Expand Down

0 comments on commit fcae50d

Please sign in to comment.