@jitsu/protocols 1.9.11 → 1.9.12
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/analytics.d.ts +31 -0
- package/package.json +1 -1
package/analytics.d.ts
CHANGED
|
@@ -12,12 +12,19 @@ export type WithConfidence<T> = T & {
|
|
|
12
12
|
export type Geo = {
|
|
13
13
|
continent?: {
|
|
14
14
|
code: "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
15
|
+
/**
|
|
16
|
+
* Localized name of the continent
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
15
19
|
};
|
|
16
20
|
country?: {
|
|
17
21
|
/**
|
|
18
22
|
* Two-letter country code (ISO 3166-1 alpha-2): https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
19
23
|
*/
|
|
20
24
|
code: string;
|
|
25
|
+
/**
|
|
26
|
+
* Localized name of the country
|
|
27
|
+
*/
|
|
21
28
|
name: string;
|
|
22
29
|
isEU: boolean;
|
|
23
30
|
};
|
|
@@ -27,8 +34,15 @@ export type Geo = {
|
|
|
27
34
|
* For USA it's two-letter capitaluzed state code (such as NY)
|
|
28
35
|
*/
|
|
29
36
|
code: string;
|
|
37
|
+
/**
|
|
38
|
+
* Localized name of the region
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
30
41
|
}>;
|
|
31
42
|
city?: WithConfidence<{
|
|
43
|
+
/**
|
|
44
|
+
* Localized name of the city
|
|
45
|
+
*/
|
|
32
46
|
name: string;
|
|
33
47
|
}>;
|
|
34
48
|
|
|
@@ -332,12 +346,29 @@ export type JitsuOptions = {
|
|
|
332
346
|
* To enable debug logging
|
|
333
347
|
*/
|
|
334
348
|
debug?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Default payload context to be included in all requests.
|
|
351
|
+
* These attributes are merged with the request-specific payload context,
|
|
352
|
+
* allowing common or global data (e.g., browser timezone, some extra user identifier)
|
|
353
|
+
* to be automatically included to every request.
|
|
354
|
+
*
|
|
355
|
+
* The context can be a nested structure.
|
|
356
|
+
*/
|
|
357
|
+
defaultPayloadContext?: Record<string, JSONValue>;
|
|
335
358
|
/**
|
|
336
359
|
* Explicitly specify cookie domain. If not set, cookie domain will be set to top level
|
|
337
360
|
* of the current domain. Example: if JS lives on "app.example.com", cookie domain will be
|
|
338
361
|
* set to ".example.com". If it lives on "example.com", cookie domain will be set to ".example.com" too
|
|
339
362
|
*/
|
|
340
363
|
cookieDomain?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Additional cookies to capture, where the keys are cookie names and
|
|
366
|
+
* the values are the corresponding cookie values. By default, the following cookies are captured:
|
|
367
|
+
* - Facebook: `_fbc`, `_fbp`
|
|
368
|
+
* - Google Analytics 4: GA4 client ID
|
|
369
|
+
* This property allows you to capture additional cookies beyond the defaults.
|
|
370
|
+
*/
|
|
371
|
+
cookieCapture?: Record<string, string>;
|
|
341
372
|
/**
|
|
342
373
|
* Provide fetch implementation. It is required if you want to use Jitsu in NodeJS
|
|
343
374
|
*/
|