Skip to content

Commit

Permalink
Add goatcounter.
Browse files Browse the repository at this point in the history
  • Loading branch information
angrytongan committed Nov 28, 2024
1 parent 0430cff commit 80be4ba
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 13 deletions.
7 changes: 7 additions & 0 deletions docs/_import/components/analytics.e0581a97.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
window.addEventListener('load', () => {
if (window?.goatcounter?.count) {
window.goatcounter.count({
path: location.pathname + location.search + location.hash,
});
}
})
8 changes: 6 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
<link rel="modulepreload" href="./_observablehq/client.25d019b4.js">
<link rel="modulepreload" href="./_observablehq/runtime.9393ab6d.js">
<link rel="modulepreload" href="./_observablehq/stdlib.06c45d1b.js">
<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="./_import/components/analytics.e0581a97.js"></script>

<script type="module">

import "./_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -66,7 +70,7 @@
interesting; perhaps you'll find them interesting too.</p>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
8 changes: 6 additions & 2 deletions docs/recreation/the-gym.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
<link rel="modulepreload" href="../_observablehq/client.25d019b4.js">
<link rel="modulepreload" href="../_observablehq/runtime.9393ab6d.js">
<link rel="modulepreload" href="../_observablehq/stdlib.06c45d1b.js">
<link rel="icon" href="../_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="../_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="../_import/components/analytics.e0581a97.js"></script>

<script type="module">

import "../_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -65,7 +69,7 @@ <h1 id="the-gym" tabindex="-1"><a class="observablehq-header-anchor" href="#the-
<p><img src="../_file/images/IMG_0059.a9ecdcd7.jpeg" alt="the gym"></p>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
8 changes: 6 additions & 2 deletions docs/recreation/yoe-year1-review/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
<link rel="modulepreload" href="../../_import/recreation/yoe-year1-review/charts/data.a8f20219.js">
<link rel="modulepreload" href="../../_import/recreation/yoe-year1-review/datetime.22c1d16f.js">
<link rel="modulepreload" href="../../_npm/[email protected]/8f16b64a.js">
<link rel="icon" href="../../_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="../../_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="../../_import/components/analytics.e0581a97.js"></script>

<script type="module">

import {define} from "../../_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -1666,7 +1670,7 @@ <h2 id="recommendation" tabindex="-1"><a class="observablehq-header-anchor" href
</style>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
8 changes: 6 additions & 2 deletions docs/recreation/yoe-year2-review/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
<link rel="modulepreload" href="../../_import/recreation/yoe-year1-review/charts/data.a8f20219.js">
<link rel="modulepreload" href="../../_import/recreation/yoe-year1-review/charts/repeated.78a60aae.js">
<link rel="modulepreload" href="../../_npm/[email protected]/8f16b64a.js">
<link rel="icon" href="../../_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="../../_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="../../_import/components/analytics.e0581a97.js"></script>

<script type="module">

import {define} from "../../_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -923,7 +927,7 @@ <h2 id="recommendations" tabindex="-1"><a class="observablehq-header-anchor" hre
</style>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
8 changes: 6 additions & 2 deletions docs/resume.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
<link rel="modulepreload" href="./_observablehq/client.25d019b4.js">
<link rel="modulepreload" href="./_observablehq/runtime.9393ab6d.js">
<link rel="modulepreload" href="./_observablehq/stdlib.06c45d1b.js">
<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="./_import/components/analytics.e0581a97.js"></script>

<script type="module">

import "./_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -213,7 +217,7 @@ <h2 id="references" tabindex="-1"><a class="observablehq-header-anchor" href="#r
<p>Available upon request.</p>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
8 changes: 6 additions & 2 deletions docs/yoe-year1-review.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
<link rel="modulepreload" href="./_observablehq/client.25d019b4.js">
<link rel="modulepreload" href="./_observablehq/runtime.9393ab6d.js">
<link rel="modulepreload" href="./_observablehq/stdlib.06c45d1b.js">
<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">

<link rel="icon" href="./_file/observable.1af93621.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async="" src="https://gc.zgo.at/count.js"></script>
<script src="./_import/components/analytics.e0581a97.js"></script>

<script type="module">

import {define} from "./_observablehq/client.25d019b4.js";
Expand Down Expand Up @@ -67,7 +71,7 @@
<div class="observablehq observablehq--block"><!--:f9500e83:--></div>
</main>
<footer id="observablehq-footer">
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-24T17:38:12">Nov 24, 2024</a>.</div>
<div>Built with <a href="https://observablehq.com/" target="_blank" rel="noopener noreferrer">Observable</a> on <a title="2024-11-28T19:32:00">Nov 28, 2024</a>.</div>
</footer>
</div>
</body>
Expand Down
6 changes: 5 additions & 1 deletion observablehq.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export default {
],

// Content to add to the head of the page, e.g. for a favicon:
head: '<link rel="icon" href="observable.png" type="image/png" sizes="32x32">',
head: `
<link rel="icon" href="observable.png" type="image/png" sizes="32x32">
<script data-goatcounter="https://angrytongan.goatcounter.com/count" async src="https://gc.zgo.at/count.js"></script>
<script src="/components/analytics.js"></script>
`,

// The path to the source root.
root: "src",
Expand Down
7 changes: 7 additions & 0 deletions src/components/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
window.addEventListener('load', () => {
if (window?.goatcounter?.count) {
window.goatcounter.count({
path: location.pathname + location.search + location.hash,
});
}
})

0 comments on commit 80be4ba

Please sign in to comment.