Skip to content

Commit

Permalink
update analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
panr committed Aug 22, 2024
1 parent 2abf825 commit 8135b03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 0 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
<html>

<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T1DS3R5LFM"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-T1DS3R5LFM');
</script>
<!-- Google Tag Manager -->
<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],
Expand Down
12 changes: 9 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,15 @@ function getTerminalCSS(e) {
a.download = "terminal.css"
a.click()

gtag("event", "download", {
event_category: "download",
event_label: `bg: ${s.get("background")}, fg: ${s.get("foreground")}, accent: ${s.get("accent")}, radius: ${s.get("radius")}, type: ${s.get("type")}`

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "download",
background: s.get("background"),
foreground: s.get("foreground"),
accent: s.get("accent"),
radius: s.get("radius"),
type: s.get("type")
})
})
}
Expand Down

0 comments on commit 8135b03

Please sign in to comment.