Skip to content

Commit ecb3a6d

Browse files
committed
Adding anonymous telemetry to builds
1 parent 5795925 commit ecb3a6d

File tree

6 files changed

+450
-3
lines changed

6 files changed

+450
-3
lines changed

.env.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ AI_PROCESSING_ENDPOINT=https://<your-endpoint>/api/webhook
99

1010
# the following are only used for the nextjs app
1111
# AUTO_RESPONDER_INKEEP_API_KEY=
12-
INTERNAL_ONLY=true
12+
INTERNAL_ONLY=true

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,12 @@ To run the AI Autoresponder in debug mode:
4646
2. Redeploy the application
4747

4848
In debug mode, the AI Auto Responder will only create internal notes (not visible to end-users) when responding to tickets.
49+
50+
## Telemetry
51+
52+
This template includes anonymous telemetry to help us understand usage patterns and improve the product. We only collect anonymous deployment events with no personal or sensitive information.
53+
54+
To disable telemetry, set the environment variable:
55+
```bash
56+
INKEEP_TELEMETRY_DISABLED=true
57+
```

next.config.ts

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const nextConfig: NextConfig = {
77
experimental: {
88
after: true,
99
},
10+
env: {
11+
INKEEP_TELEMETRY_DISABLED: process.env.INKEEP_TELEMETRY_DISABLED
12+
}
1013
};
1114

1215
export default nextConfig;

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,32 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbopack",
7-
"build": "next build",
8-
"zis": "bash ./scripts/setup-zis.sh",
7+
"build": "pnpm run telemetry && next build",
8+
"telemetry": "npx tsx scripts/telemetry.ts",
99
"start": "next start",
1010
"lint": "next lint"
1111
},
1212
"dependencies": {
1313
"@ai-sdk/openai": "^0.0.70",
1414
"@t3-oss/env-nextjs": "^0.11.1",
1515
"ai": "^3.4.33",
16+
"dotenv": "^16.4.5",
1617
"next": "15.0.1",
18+
"node-fetch": "^3.3.2",
1719
"node-zendesk": "^5.0.13",
1820
"react": "19.0.0-rc-69d4b800-20241021",
1921
"react-dom": "19.0.0-rc-69d4b800-20241021",
22+
"undici": "^6.6.2",
2023
"zod": "^3.23.8"
2124
},
2225
"devDependencies": {
2326
"@types/node": "^20",
27+
"@types/node-fetch": "^2.6.11",
2428
"@types/react": "^18",
2529
"@types/react-dom": "^18",
2630
"eslint": "^8",
2731
"eslint-config-next": "15.0.1",
32+
"tsx": "^4.7.1",
2833
"typescript": "^5"
2934
}
3035
}

0 commit comments

Comments
 (0)