Skip to content

Commit db52c3b

Browse files
committed
add ga
1 parent 44c52b5 commit db52c3b

File tree

3 files changed

+169
-90111
lines changed

3 files changed

+169
-90111
lines changed

backend/server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ const maxCacheAgeMs = hourInMs;
1616

1717
const msToMinutes = (1 / msPerSec) * (1 / secPerMin);
1818

19+
app.use(function (req, res, next) {
20+
console.log(req.url)
21+
next()
22+
})
23+
24+
1925
app.get("/package_data", async (req, res) => {
2026
const now = Date.now();
2127
const age = now - cachedData.cachedAt;

frontend/public/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@
2727
Learn how to configure a non-root public URL by running `npm run build`.
2828
-->
2929
<title>The Big List of Python Packaging and Distribution Tools</title>
30+
<!-- Global site tag (gtag.js) - Google Analytics -->
31+
<script
32+
async
33+
src="https://www.googletagmanager.com/gtag/js?id=UA-90243909-1"
34+
></script>
35+
<script>
36+
window.dataLayer = window.dataLayer || [];
37+
function gtag() {
38+
dataLayer.push(arguments);
39+
}
40+
gtag('js', new Date());
41+
42+
gtag('config', 'UA-90243909-1');
43+
</script>
3044
</head>
3145
<body class="min-h-screen flex flex-col">
3246
<noscript>You need to enable JavaScript to run this app.</noscript>

0 commit comments

Comments
 (0)