fresh_ga is a Fresh Frameworkplugin. It helps you to add gtag to your site in seconds.
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Dependencies
deno.land/x
fresh-ga
fresh-ga is a Fresh Framework plugin. It helps you to add gtag to your site in seconds.
Usage
add to your import map
// in your import_map.json
{
"imports": {
"ga/": "https://deno.land/x/fresh-ga@0.2.3/"
}
}
set GA_TRACKING_ID Environment Variable
# in your .env
GA_TRACKING_ID=G-XXXXXXXXX-X
setup your main.ts
// in your main.ts
import { gaPlugin } from "ga/mod.ts";
await start(manifest, {
plugins: [
// ...
gaPlugin({ enableServerGa: true }), // if you want to use server side ga
// ...
],
});