@databuddy/sdk 2.1.75 → 2.1.76

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.
@@ -1,5 +1,5 @@
1
- import { D as DatabuddyConfig, a as DatabuddyTracker, T as TrackFunction, b as Databuddy$1 } from '../shared/@databuddy/sdk.BEpoKc14.mjs';
2
- export { B as BaseEventProperties, e as DataAttributes, d as EventName, E as EventProperties, c as EventTypeMap, P as PropertiesForEvent, S as ScreenViewFunction, f as SetGlobalPropertiesFunction } from '../shared/@databuddy/sdk.BEpoKc14.mjs';
1
+ import { D as DatabuddyConfig, a as DatabuddyTracker, T as TrackFunction, b as Databuddy$1 } from '../shared/@databuddy/sdk.C8T93n5r.mjs';
2
+ export { B as BaseEventProperties, e as DataAttributes, d as EventName, E as EventProperties, c as EventTypeMap, P as PropertiesForEvent, S as ScreenViewFunction, f as SetGlobalPropertiesFunction } from '../shared/@databuddy/sdk.C8T93n5r.mjs';
3
3
 
4
4
  /**
5
5
  * Auto-detect Databuddy client ID from environment variables
@@ -1,5 +1,5 @@
1
- import { D as DatabuddyConfig, a as DatabuddyTracker, T as TrackFunction, b as Databuddy$1 } from '../shared/@databuddy/sdk.BEpoKc14.js';
2
- export { B as BaseEventProperties, e as DataAttributes, d as EventName, E as EventProperties, c as EventTypeMap, P as PropertiesForEvent, S as ScreenViewFunction, f as SetGlobalPropertiesFunction } from '../shared/@databuddy/sdk.BEpoKc14.js';
1
+ import { D as DatabuddyConfig, a as DatabuddyTracker, T as TrackFunction, b as Databuddy$1 } from '../shared/@databuddy/sdk.C8T93n5r.js';
2
+ export { B as BaseEventProperties, e as DataAttributes, d as EventName, E as EventProperties, c as EventTypeMap, P as PropertiesForEvent, S as ScreenViewFunction, f as SetGlobalPropertiesFunction } from '../shared/@databuddy/sdk.C8T93n5r.js';
3
3
 
4
4
  /**
5
5
  * Auto-detect Databuddy client ID from environment variables
@@ -1,6 +1,6 @@
1
- import { D as Databuddy$1 } from '../shared/@databuddy/sdk.mo6tEgU3.mjs';
2
- export { d as detectClientId } from '../shared/@databuddy/sdk.mo6tEgU3.mjs';
3
- export { c as createScript, i as isScriptInjected } from '../shared/@databuddy/sdk.DsZP9wPD.mjs';
1
+ import { D as Databuddy$1 } from '../shared/@databuddy/sdk.DrN7UcWM.mjs';
2
+ export { d as detectClientId } from '../shared/@databuddy/sdk.DrN7UcWM.mjs';
3
+ export { c as createScript, i as isScriptInjected } from '../shared/@databuddy/sdk.D3SKeeIX.mjs';
4
4
 
5
5
  function isTrackerAvailable() {
6
6
  return typeof window !== "undefined" && (!!window.databuddy || !!window.db);
@@ -1,4 +1,4 @@
1
- export { b as Databuddy } from '../shared/@databuddy/sdk.BEpoKc14.mjs';
1
+ export { b as Databuddy } from '../shared/@databuddy/sdk.C8T93n5r.mjs';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
4
  import * as jotai from 'jotai';
@@ -1,4 +1,4 @@
1
- export { b as Databuddy } from '../shared/@databuddy/sdk.BEpoKc14.js';
1
+ export { b as Databuddy } from '../shared/@databuddy/sdk.C8T93n5r.js';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
4
  import * as jotai from 'jotai';
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
 
3
- export { D as Databuddy } from '../shared/@databuddy/sdk.mo6tEgU3.mjs';
3
+ export { D as Databuddy } from '../shared/@databuddy/sdk.DrN7UcWM.mjs';
4
4
  import { createStore, atom, Provider, useAtom } from 'jotai';
5
5
  import { useEffect, createElement } from 'react';
6
- import '../shared/@databuddy/sdk.DsZP9wPD.mjs';
6
+ import '../shared/@databuddy/sdk.D3SKeeIX.mjs';
7
7
 
8
8
  class Logger {
9
9
  debugEnabled = false;
@@ -163,6 +163,9 @@ interface DatabuddyConfig {
163
163
  * Min: 100, Max: 30000
164
164
  */
165
165
  batchTimeout?: number;
166
+ /** Array of glob patterns to skip tracking on matching paths (e.g., ['/admin/**']) */
167
+ skipPatterns?: string[];
168
+ maskPatterns?: string[];
166
169
  }
167
170
  /**
168
171
  * Base event properties that can be attached to any event
@@ -163,6 +163,9 @@ interface DatabuddyConfig {
163
163
  * Min: 100, Max: 30000
164
164
  */
165
165
  batchTimeout?: number;
166
+ /** Array of glob patterns to skip tracking on matching paths (e.g., ['/admin/**']) */
167
+ skipPatterns?: string[];
168
+ maskPatterns?: string[];
166
169
  }
167
170
  /**
168
171
  * Base event properties that can be attached to any event
@@ -1,4 +1,4 @@
1
- const version = "2.1.7";
1
+ const version = "2.1.76";
2
2
 
3
3
  const INJECTED_SCRIPT_ATTRIBUTE = "data-databuddy-injected";
4
4
  function isScriptInjected() {
@@ -17,7 +17,11 @@ function createScript({
17
17
  script.setAttribute("data-sdk-version", sdkVersion || version);
18
18
  for (const [key, value] of Object.entries(props)) {
19
19
  const dataKey = `data-${key.replace(/([A-Z])/g, "-$1").toLowerCase()}`;
20
- script.setAttribute(dataKey, String(value));
20
+ if (Array.isArray(value) || value && typeof value === "object") {
21
+ script.setAttribute(dataKey, JSON.stringify(value));
22
+ } else {
23
+ script.setAttribute(dataKey, String(value));
24
+ }
21
25
  }
22
26
  return script;
23
27
  }
@@ -1,4 +1,4 @@
1
- import { i as isScriptInjected, c as createScript } from './sdk.DsZP9wPD.mjs';
1
+ import { i as isScriptInjected, c as createScript } from './sdk.D3SKeeIX.mjs';
2
2
 
3
3
  function detectClientId(providedClientId) {
4
4
  if (providedClientId) {
@@ -145,6 +145,14 @@ declare const Databuddy: vue.DefineComponent<{
145
145
  type: NumberConstructor;
146
146
  required: false;
147
147
  } | undefined;
148
+ skipPatterns?: {
149
+ type: never;
150
+ required: false;
151
+ } | undefined;
152
+ maskPatterns?: {
153
+ type: never;
154
+ required: false;
155
+ } | undefined;
148
156
  }, () => null, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {
149
157
  sdk?: string | undefined;
150
158
  clientId?: string | undefined;
@@ -182,6 +190,8 @@ declare const Databuddy: vue.DefineComponent<{
182
190
  enableBatching?: boolean | undefined;
183
191
  batchSize?: number | undefined;
184
192
  batchTimeout?: number | undefined;
193
+ skipPatterns?: any;
194
+ maskPatterns?: any;
185
195
  }>, {}>;
186
196
 
187
197
  export { Databuddy };
@@ -145,6 +145,14 @@ declare const Databuddy: vue.DefineComponent<{
145
145
  type: NumberConstructor;
146
146
  required: false;
147
147
  } | undefined;
148
+ skipPatterns?: {
149
+ type: never;
150
+ required: false;
151
+ } | undefined;
152
+ maskPatterns?: {
153
+ type: never;
154
+ required: false;
155
+ } | undefined;
148
156
  }, () => null, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<{} & {
149
157
  sdk?: string | undefined;
150
158
  clientId?: string | undefined;
@@ -182,6 +190,8 @@ declare const Databuddy: vue.DefineComponent<{
182
190
  enableBatching?: boolean | undefined;
183
191
  batchSize?: number | undefined;
184
192
  batchTimeout?: number | undefined;
193
+ skipPatterns?: any;
194
+ maskPatterns?: any;
185
195
  }>, {}>;
186
196
 
187
197
  export { Databuddy };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, onUnmounted, watch } from 'vue';
2
- import { i as isScriptInjected, c as createScript } from '../shared/@databuddy/sdk.DsZP9wPD.mjs';
2
+ import { i as isScriptInjected, c as createScript } from '../shared/@databuddy/sdk.D3SKeeIX.mjs';
3
3
 
4
4
  const Databuddy = defineComponent({
5
5
  props: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databuddy/sdk",
3
- "version": "2.1.75",
3
+ "version": "2.1.76",
4
4
  "description": "Official Databuddy Analytics SDK",
5
5
  "main": "./dist/core/index.mjs",
6
6
  "types": "./dist/core/index.d.ts",