Skip to content

Commit 84affc6

Browse files
committed
add ai analytics middleware using 2027-track
1 parent bc4100c commit 84affc6

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

middleware.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { withAIAnalytics } from "2027-track/next";
2+
3+
export default withAIAnalytics();
4+
5+
export const config = {
6+
matcher: [
7+
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)",
8+
],
9+
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"homepage": "https://docs.langfuse.com",
2525
"dependencies": {
26+
"2027-track": "^0.1.0",
2627
"@ai-sdk/openai": "^2.0.14",
2728
"@ai-sdk/react": "^2.0.8",
2829
"@calcom/embed-react": "^1.5.2",

pnpm-lock.yaml

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)