@usermaven/sdk-js 1.0.0 → 1.0.1

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.
@@ -88,6 +88,11 @@ export type Policy = 'strict' | 'keep' | 'comply'
88
88
  */
89
89
  export type UsermavenOptions = {
90
90
 
91
+ /**
92
+ * If auto-capturing is enabled on all sort of events | for future work
93
+ */
94
+ autocapture?: boolean,
95
+
91
96
  /**
92
97
  * If Usermaven should work in compatibility mode. If set to true:
93
98
  * - event_type will be set to 'eventn' instead of 'usermaven'
@@ -182,6 +187,18 @@ export type UsermavenOptions = {
182
187
  */
183
188
  log_level?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'NONE';
184
189
 
190
+ /**
191
+ * Type of persistence required
192
+ * Possible values: cookie | localStorage | localStorage+cookie | memory
193
+ * Default value: cookie
194
+ */
195
+ persistence?: PersistenceType;
196
+
197
+ /**
198
+ * Persistent connection name
199
+ */
200
+ persistence_name?: string;
201
+
185
202
  //NOTE: If any property is added here, please make sure it's added to browser.ts usermavenProps as well
186
203
  };
187
204
 
@@ -228,7 +245,7 @@ export type EventCtx = {
228
245
  referer: string //document referer
229
246
  url: string //current url
230
247
  page_title: string //page title
231
- //see UTM_TYPES for all supported utm tags
248
+ //see UTM_TYPES for all supported utm tags
232
249
  doc_path: string //document path
233
250
  doc_host: string //document host
234
251
  doc_search: string //document search string
@@ -258,9 +275,9 @@ export type Transport = (url: string, jsonPayload: string) => Promise<void>
258
275
  * Type of event source
259
276
  */
260
277
  export type EventSrc =
261
- 'jitsu' | //event came directly from Usermaven
262
- 'eventn' | //same as usermaven but for 'compat' mode, see
263
- 'ga' | //event is intercepted from GA
278
+ 'usermaven' | //event came directly from Usermaven
279
+ 'eventn' | //same as usermaven but for 'compat' mode, see
280
+ 'ga' | //event is intercepted from GA
264
281
  '3rdparty' | //event is intercepted from 3rdparty source
265
282
  'ajs'; //event is intercepted from analytics.js
266
283
 
@@ -287,3 +304,4 @@ export type EventCompat = EventBasics & {
287
304
  eventn_ctx: EventCtx
288
305
  } & EventPayload;
289
306
 
307
+ export type PersistenceType = 'cookie' | 'localStorage' | 'localStorage+cookie' | 'memory';