Skip to content

Commit

Permalink
Add Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhg committed Jun 25, 2018
1 parent c4b047d commit ea383ab
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>1</title>
<link rel="stylesheet" href="./main.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-35381607-11"></script>
<script src="../common/ga.js"></script>
</head>
<body>
<script src="./main.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions 2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>2</title>
<link rel="stylesheet" href="./main.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-35381607-11"></script>
<script src="../common/ga.js"></script>
</head>
<body>
<script src="./main.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions 3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>3</title>
<link rel="stylesheet" href="./main.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-35381607-11"></script>
<script src="../common/ga.js"></script>
</head>
<body>
<script src="./main.js"></script>
Expand Down
7 changes: 7 additions & 0 deletions common/ga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())

gtag('config', 'UA-35381607-11')
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Generative Art</title>
<link rel="stylesheet" href="./main.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-35381607-11"></script>
<script src="./common/ga.js"></script>
</head>
<body>
<h1>Generative Art</h1>
Expand Down

0 comments on commit ea383ab

Please sign in to comment.