Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ga4 plugin #654

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ git rev-parse HEAD
[set up your Stripe branding](https://dashboard.stripe.com/settings/branding)
to customize the look and feel of your Stripe checkout page.

### Google Analytics

Set `GA4_MEASUREMENT_ID` in your production system to enable google analytics.
Note: it is not recommended to set this locally, otherwise your tests and
debugging will be logged.

## REST API Reference

### `GET /api/items`
Expand Down
4 changes: 3 additions & 1 deletion fresh.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import errorHandling from "./plugins/error_handling.ts";
import securityHeaders from "./plugins/security_headers.ts";
import welcomePlugin from "./plugins/welcome.ts";
import type { FreshConfig } from "$fresh/server.ts";
import { ga4Plugin } from "https://deno.land/x/[email protected]/mod.ts";

export default {
plugins: [
ga4Plugin(),
welcomePlugin,
kvOAuthPlugin,
sessionPlugin,
tailwind(),
errorHandling,
securityHeaders,
],
} as FreshConfig;
} satisfies FreshConfig;