Skip to content

Commit

Permalink
feat: add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Oct 6, 2023
1 parent a52c827 commit 27db32c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"enrico",
"fontawesome",
"fortawesome",
"G-7X21LHFPMF",
"github",
"hostingchannels",
"immer",
Expand Down
20 changes: 19 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="WFRC RTP Projects Web Map" />
<link rel="icon" type="image/x-icon" href="https://wfrc.org/favicon.ico" />
<title>WFRC RTP Projects</title>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7X21LHFPMF"></script>
<script>
// we don't want analytics for staging...
if (%MODE% !== 'staging') {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

// ugrc account
gtag('config', 'G-7X21LHFPMF', { debug_mode: JSON.parse('%DEV%') });

// wfrc account
gtag('config', 'wA-83489504-1', { debug_mode: JSON.parse('%DEV%') });
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down

0 comments on commit 27db32c

Please sign in to comment.