@sprout_ai_labs/sidekick 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,7 @@ A Vue 3 plugin providing responsive chat components with custom Sidekick brandin
18
18
  - 🔔 **Error Handling**: Built-in snackbar notifications for errors and success messages
19
19
  - 📝 **Markdown Support**: Rich text rendering in messages
20
20
  - 🔍 **KB Sources**: Citation support for knowledge base sources
21
+ - 📊 **Analytics Control**: Optional analytics tracking with standalone mode support
21
22
 
22
23
  ## Demo
23
24
 
@@ -163,6 +164,7 @@ interface SidekickChatOptions {
163
164
  skipDesignSystem?: boolean // Optional: Skip design system installation
164
165
  baseUrl?: string // Optional: Custom backend URL (overrides mode)
165
166
  deviceSource?: 'mobile' | 'web' // Optional: Device type (default: 'web')
167
+ standalone?: boolean // Optional: Disable analytics tracking (default: false)
166
168
  }
167
169
  ```
168
170
 
@@ -176,6 +178,7 @@ interface SidekickChatOptions {
176
178
  - **`baseUrl`**: Custom backend URL (takes precedence over `mode`)
177
179
  - **`deviceSource`**: Device type identifier (`'mobile'` or `'web'`, default: `'web'`)
178
180
  - **`skipDesignSystem`**: Skip design system installation if already installed
181
+ - **`standalone`**: Disable analytics tracking when `true` (default: `false`)
179
182
 
180
183
  ### Environment Variables
181
184
 
@@ -227,6 +230,16 @@ app.use(SproutSidekickPlugin, {
227
230
  })
228
231
  ```
229
232
 
233
+ **Standalone mode (disable analytics):**
234
+
235
+ ```javascript
236
+ app.use(SproutSidekickPlugin, {
237
+ mode: 'PROD', // Required
238
+ appName: 'My App', // Required
239
+ standalone: true, // Disables all analytics tracking
240
+ })
241
+ ```
242
+
230
243
  **Priority Order for Backend URL:**
231
244
 
232
245
  1. `baseUrl` (if provided) - highest priority
@@ -237,6 +250,32 @@ app.use(SproutSidekickPlugin, {
237
250
  Both `mode` and `appName` are **required**. The plugin will throw an error at installation time if either is missing.
238
251
  :::
239
252
 
253
+ ### Analytics Tracking
254
+
255
+ By default, the plugin tracks analytics for all chat interactions. You can disable analytics by setting `standalone: true`:
256
+
257
+ ```javascript
258
+ // Analytics enabled (default)
259
+ app.use(SproutSidekickPlugin, {
260
+ mode: 'PROD',
261
+ appName: 'My App',
262
+ // standalone: false (default)
263
+ })
264
+
265
+ // Analytics disabled
266
+ app.use(SproutSidekickPlugin, {
267
+ mode: 'PROD',
268
+ appName: 'My App',
269
+ standalone: true, // All analytics calls are skipped
270
+ })
271
+ ```
272
+
273
+ When `standalone: true` is set:
274
+ - All analytics logging is disabled
275
+ - No data is sent to the analytics endpoints
276
+ - Feature flag validation calls are skipped
277
+ - Perfect for development, testing, or privacy-focused implementations
278
+
240
279
  ### Design System Handling
241
280
 
242
281
  The plugin automatically detects if the Sprout Design System is already installed in your application to prevent duplicate installations. This ensures optimal performance and avoids conflicts.
@@ -301,6 +340,7 @@ interface SidekickChatOptions {
301
340
  skipDesignSystem?: boolean
302
341
  baseUrl?: string
303
342
  deviceSource?: 'mobile' | 'web'
343
+ standalone?: boolean
304
344
  }
305
345
 
306
346
  // Chat message