This is my personal website

configure fresh ga plugin

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