Skip to content

Commit

Permalink
Add Google Analytics via vite-plugin-radar (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
kucera-lukas authored Sep 21, 2022
1 parent e89b48b commit 8e8f2ff
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Continuous Deployment

on:
push:
branches: [main, feat/gcp-deployment]
branches: [main]

jobs:
build:
Expand Down
Binary file added web/assets/images/favicon.ico
Binary file not shown.
11 changes: 7 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
<head>
<meta charset="UTF-8" />
<link
rel="icon"
type="image/svg+xml"
href="/vite.svg"
rel="shortcut icon"
href="assets/images/favicon.ico"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<meta
name="color-scheme"
content="dark"
/>
<title>micro-backends</title>
</head>
<body>
<div id="root"></div>
<script
type="module"
src="/src/main.tsx"
src="src/main.tsx"
></script>
</body>
</html>
19 changes: 18 additions & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"prettier": "^2.7.1",
"typescript": "^4.8.2",
"vite": "^3.0.9",
"vite-plugin-checker": "^0.5.0"
"vite-plugin-checker": "^0.5.0",
"vite-plugin-radar": "^0.5.0"
}
}
4 changes: 4 additions & 0 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import checker from "vite-plugin-checker";
import { VitePluginRadar } from "vite-plugin-radar";

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -12,5 +13,8 @@ export default defineConfig({
lintCommand: 'eslint "./src/**/*.{ts,tsx}" --fix',
},
}),
VitePluginRadar({
analytics: { id: process.env.VITE_GA_MEASUREMENT_ID },
}),
],
});

0 comments on commit 8e8f2ff

Please sign in to comment.