This is my personal website

configure fresh ga plugin

+6 -8
+1
.github/workflows/deploy.yml
··· 21 21 env: 22 22 DENO_PROJECT: ${{ secrets.DENO_PROJECT }} 23 23 DENO_DEPLOY_TOKEN: ${{ secrets.DENO_DEPLOY_TOKEN }} 24 + GA_TRACKING_ID: G-2LP61SRX58
+3 -2
deno.json
··· 31 31 "tailwindcss": "npm:tailwindcss@3.4.1", 32 32 "tailwindcss/": "npm:/tailwindcss@3.4.1/", 33 33 "tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js", 34 - "$std/": "https://deno.land/std@0.216.0/" 34 + "$std/": "https://deno.land/std@0.216.0/", 35 + "ga/": "https://deno.land/x/fresh_ga@0.2.6/" 35 36 }, 36 37 "compilerOptions": { 37 38 "jsx": "react-jsx", 38 39 "jsxImportSource": "preact" 39 40 }, 40 41 "nodeModulesDir": "auto" 41 - } 42 + }
+2 -1
fresh.config.ts
··· 1 1 import tailwind from "$fresh/plugins/tailwind.ts"; 2 2 import { defineConfig } from "$fresh/server.ts"; 3 + import { gaPlugin } from "ga/mod.ts"; 3 4 4 5 export default defineConfig({ 5 - plugins: [tailwind()], 6 + plugins: [tailwind(), gaPlugin({ enableServerGa: true })], 6 7 });
-5
routes/_app.tsx
··· 9 9 <title>Tsiry Sandratraina</title> 10 10 <link rel="stylesheet" href="/styles.css" /> 11 11 </head> 12 - <script 13 - async 14 - src="https://www.googletagmanager.com/gtag/js?id=G-2LP61SRX58" 15 - > 16 - </script> 17 12 <body> 18 13 <Component /> 19 14 </body>