Skip to content

Commit c27b72d

Browse files
committedOct 4, 2024
Add analytics
1 parent 9af5677 commit c27b72d

File tree

4 files changed

+36
-5
lines changed

4 files changed

+36
-5
lines changed
 

‎README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,17 @@ Run in development mode:
3434
bun run dev
3535
```
3636

37-
## The server
37+
You can also create a production build with `bun run prePublish`.
38+
39+
## Forking
40+
41+
Feel free to fork, change, and deploy this app yourself! See the notes below on
42+
updating the server logic if you do.
43+
44+
Also you should remove the Google Analytics code in `index.html` or update the
45+
tracking code to match your own site.
46+
47+
## The Server
3848

3949
The server is simply a proxy to assist in the GitHub OAuth flow and is already
4050
deployed on `api.tinyhub.org`. If you want to run your own server instance (for
@@ -61,7 +71,7 @@ currently:
6171
- It doesn't paginate the GitHub API, so records max out at 100
6272
- It doesn't work without logging in
6373

64-
## How it works
74+
## How It Works
6575

6676
The app is in TypeScript, using React (for the UI) and TinyBase (for the state
6777
and data store). The CSS is hand-crafted, so don't expect anything amazing on
@@ -96,4 +106,4 @@ would be better.
96106
As for the UI, the React components for each part of the app should be fairly
97107
simple and self-explanatory.
98108

99-
Enjoy!
109+
## Enjoy!

‎client/cspell.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"tinyhub",
1515
"tinyplex",
1616
"tinywidgets",
17-
"vuejs"
17+
"vuejs",
18+
"ZNHM"
1819
]
1920
}

‎client/index.html

+20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4+
<!--
5+
If you have forked this project, you should replace the Google Analytics
6+
ID below with your own. Alternatively, simply remove this block of HTML
7+
altogether.
8+
-->
9+
<script
10+
async
11+
src="https://www.googletagmanager.com/gtag/js?id=G-ZNHM7QY3E5"
12+
></script>
13+
<script>
14+
window['ga-disable-G-ZNHM7QY3E5'] = true;
15+
window.dataLayer = window.dataLayer || [];
16+
function g() {
17+
dataLayer.push(arguments);
18+
}
19+
g('js', new Date());
20+
g('config', 'G-ZNHM7QY3E5');
21+
</script>
22+
<!-- End of Google Analytics -->
23+
424
<meta charset="UTF-8" />
525
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
626
<link href="/index.css" rel="stylesheet" />

‎docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="/index.css" rel="stylesheet"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><title>TinyHub</title><script type="module" crossorigin src="/assets/index-4IK9EYxE.js"></script><link rel="modulepreload" crossorigin href="/assets/octokit-C51hKPwz.js"><link rel="modulepreload" crossorigin href="/assets/react-jfyNKTSf.js"><link rel="modulepreload" crossorigin href="/assets/tinybase-Dd_s44Mp.js"><link rel="modulepreload" crossorigin href="/assets/tinywidgets-MvWbyqMN.js"><link rel="stylesheet" crossorigin href="/assets/tinywidgets-D5KFSoH_.css"><link rel="stylesheet" crossorigin href="/assets/index-BtLKff51.css"></head><body><div id="app"></div></body></html>
1+
<!doctype html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=G-ZNHM7QY3E5"></script><script>function a(){dataLayer.push(arguments)}window["ga-disable-G-ZNHM7QY3E5"]=!0,window.dataLayer=window.dataLayer||[],a("js",new Date),a("config","G-ZNHM7QY3E5")</script><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="/index.css" rel="stylesheet"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><title>TinyHub</title><script type="module" crossorigin src="/assets/index-4IK9EYxE.js"></script><link rel="modulepreload" crossorigin href="/assets/octokit-C51hKPwz.js"><link rel="modulepreload" crossorigin href="/assets/react-jfyNKTSf.js"><link rel="modulepreload" crossorigin href="/assets/tinybase-Dd_s44Mp.js"><link rel="modulepreload" crossorigin href="/assets/tinywidgets-MvWbyqMN.js"><link rel="stylesheet" crossorigin href="/assets/tinywidgets-D5KFSoH_.css"><link rel="stylesheet" crossorigin href="/assets/index-BtLKff51.css"></head><body><div id="app"></div></body></html>

0 commit comments

Comments
 (0)