shopkit-analytics 1.0.2 → 1.0.3
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 +35 -100
- package/dist/adapters/index.d.mts +2 -1
- package/dist/adapters/index.d.ts +2 -1
- package/dist/adapters/index.js +230 -64
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/index.mjs +3 -1
- package/dist/chunk-4RDPDMGW.mjs +68 -0
- package/dist/chunk-4RDPDMGW.mjs.map +1 -0
- package/dist/chunk-NC25KOAF.mjs +156 -0
- package/dist/chunk-NC25KOAF.mjs.map +1 -0
- package/dist/chunk-NGPUKV7E.mjs +46 -0
- package/dist/chunk-NGPUKV7E.mjs.map +1 -0
- package/dist/{chunk-U3UOXFS4.mjs → chunk-NJQ2MOM2.mjs} +206 -116
- package/dist/chunk-NJQ2MOM2.mjs.map +1 -0
- package/dist/chunk-NKDB4KX2.mjs +2 -0
- package/dist/chunk-NKDB4KX2.mjs.map +1 -0
- package/dist/{chunk-BNV3EVHH.mjs → chunk-QCS5UARA.mjs} +2 -2
- package/dist/events/index.js +218 -54
- package/dist/events/index.js.map +1 -1
- package/dist/events/index.mjs +9 -7
- package/dist/experiment/index.d.mts +25 -0
- package/dist/experiment/index.d.ts +25 -0
- package/dist/experiment/index.js +74 -0
- package/dist/experiment/index.js.map +1 -0
- package/dist/experiment/index.mjs +15 -0
- package/dist/experiment/index.mjs.map +1 -0
- package/dist/{index-DS9OI5Mz.d.ts → index-D_8w5bL_.d.ts} +13 -0
- package/dist/{index-Bym1_EAp.d.mts → index-th6sBtE3.d.mts} +13 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +400 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -7
- package/dist/index.mjs.map +1 -1
- package/dist/services/index.d.mts +51 -0
- package/dist/services/index.d.ts +51 -0
- package/dist/services/index.js +180 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/index.mjs +11 -0
- package/dist/services/index.mjs.map +1 -0
- package/dist/types-C__2IBCj.d.mts +7 -0
- package/dist/types-C__2IBCj.d.ts +7 -0
- package/dist/utils/index.d.mts +19 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.js +93 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +12 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +19 -1
- package/templates/nextjs/README.md +206 -0
- package/templates/nextjs/api-events-route.ts +62 -0
- package/dist/chunk-U3UOXFS4.mjs.map +0 -1
- /package/dist/{chunk-BNV3EVHH.mjs.map → chunk-QCS5UARA.mjs.map} +0 -0
package/dist/events/index.mjs
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
initTracking,
|
|
4
4
|
initializeEventTracking
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-QCS5UARA.mjs";
|
|
6
|
+
import {
|
|
7
|
+
eventPublisher,
|
|
8
|
+
eventSubscriber,
|
|
9
|
+
publishEvent
|
|
10
|
+
} from "../chunk-HCA4E2RA.mjs";
|
|
6
11
|
import {
|
|
7
12
|
DEFAULT_CURRENCY,
|
|
8
13
|
EventNames
|
|
9
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-NJQ2MOM2.mjs";
|
|
15
|
+
import "../chunk-NGPUKV7E.mjs";
|
|
16
|
+
import "../chunk-4RDPDMGW.mjs";
|
|
10
17
|
import {
|
|
11
18
|
EventType
|
|
12
19
|
} from "../chunk-3NR2AKE4.mjs";
|
|
13
|
-
import {
|
|
14
|
-
eventPublisher,
|
|
15
|
-
eventSubscriber,
|
|
16
|
-
publishEvent
|
|
17
|
-
} from "../chunk-HCA4E2RA.mjs";
|
|
18
20
|
export {
|
|
19
21
|
DEFAULT_CURRENCY,
|
|
20
22
|
EventNames,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { E as ExperimentData } from '../types-C__2IBCj.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get experiment parameters from cookies
|
|
5
|
+
*/
|
|
6
|
+
declare function getExperimentParams(): ExperimentData;
|
|
7
|
+
/**
|
|
8
|
+
* Check if any experiment data exists
|
|
9
|
+
*/
|
|
10
|
+
declare function hasExperimentData(): boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Prima PR A/B test experiment cookie names
|
|
14
|
+
*/
|
|
15
|
+
declare const PRIMA_EXPERIMENT_COOKIES: {
|
|
16
|
+
readonly HOME: "_prima_pr_ab_home";
|
|
17
|
+
readonly COLLECTION: "_prima_pr_ab_collection";
|
|
18
|
+
readonly PRODUCT: "_prima_pr_ab_product";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Array of all Prima experiment cookie names for iteration
|
|
22
|
+
*/
|
|
23
|
+
declare const PRIMA_EXPERIMENT_COOKIE_NAMES: ("_prima_pr_ab_home" | "_prima_pr_ab_collection" | "_prima_pr_ab_product")[];
|
|
24
|
+
|
|
25
|
+
export { ExperimentData, PRIMA_EXPERIMENT_COOKIES, PRIMA_EXPERIMENT_COOKIE_NAMES, getExperimentParams, hasExperimentData };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { E as ExperimentData } from '../types-C__2IBCj.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get experiment parameters from cookies
|
|
5
|
+
*/
|
|
6
|
+
declare function getExperimentParams(): ExperimentData;
|
|
7
|
+
/**
|
|
8
|
+
* Check if any experiment data exists
|
|
9
|
+
*/
|
|
10
|
+
declare function hasExperimentData(): boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Prima PR A/B test experiment cookie names
|
|
14
|
+
*/
|
|
15
|
+
declare const PRIMA_EXPERIMENT_COOKIES: {
|
|
16
|
+
readonly HOME: "_prima_pr_ab_home";
|
|
17
|
+
readonly COLLECTION: "_prima_pr_ab_collection";
|
|
18
|
+
readonly PRODUCT: "_prima_pr_ab_product";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Array of all Prima experiment cookie names for iteration
|
|
22
|
+
*/
|
|
23
|
+
declare const PRIMA_EXPERIMENT_COOKIE_NAMES: ("_prima_pr_ab_home" | "_prima_pr_ab_collection" | "_prima_pr_ab_product")[];
|
|
24
|
+
|
|
25
|
+
export { ExperimentData, PRIMA_EXPERIMENT_COOKIES, PRIMA_EXPERIMENT_COOKIE_NAMES, getExperimentParams, hasExperimentData };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/experiment/index.ts
|
|
22
|
+
var experiment_exports = {};
|
|
23
|
+
__export(experiment_exports, {
|
|
24
|
+
PRIMA_EXPERIMENT_COOKIES: () => PRIMA_EXPERIMENT_COOKIES,
|
|
25
|
+
PRIMA_EXPERIMENT_COOKIE_NAMES: () => PRIMA_EXPERIMENT_COOKIE_NAMES,
|
|
26
|
+
getExperimentParams: () => getExperimentParams,
|
|
27
|
+
hasExperimentData: () => hasExperimentData
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(experiment_exports);
|
|
30
|
+
|
|
31
|
+
// src/experiment/constants.ts
|
|
32
|
+
var PRIMA_EXPERIMENT_COOKIES = {
|
|
33
|
+
HOME: "_prima_pr_ab_home",
|
|
34
|
+
COLLECTION: "_prima_pr_ab_collection",
|
|
35
|
+
PRODUCT: "_prima_pr_ab_product"
|
|
36
|
+
};
|
|
37
|
+
var PRIMA_EXPERIMENT_COOKIE_NAMES = Object.values(
|
|
38
|
+
PRIMA_EXPERIMENT_COOKIES
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// src/experiment/experiment-tracker.ts
|
|
42
|
+
function getCookie(name) {
|
|
43
|
+
if (typeof document === "undefined") return null;
|
|
44
|
+
const value = `; ${document.cookie}`;
|
|
45
|
+
const parts = value.split(`; ${name}=`);
|
|
46
|
+
if (parts.length === 2) {
|
|
47
|
+
return parts.pop()?.split(";").shift() || null;
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
function getExperimentParams() {
|
|
52
|
+
return {
|
|
53
|
+
[PRIMA_EXPERIMENT_COOKIES.HOME]: getCookie(PRIMA_EXPERIMENT_COOKIES.HOME),
|
|
54
|
+
[PRIMA_EXPERIMENT_COOKIES.COLLECTION]: getCookie(
|
|
55
|
+
PRIMA_EXPERIMENT_COOKIES.COLLECTION
|
|
56
|
+
),
|
|
57
|
+
[PRIMA_EXPERIMENT_COOKIES.PRODUCT]: getCookie(
|
|
58
|
+
PRIMA_EXPERIMENT_COOKIES.PRODUCT
|
|
59
|
+
)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function hasExperimentData() {
|
|
63
|
+
return PRIMA_EXPERIMENT_COOKIE_NAMES.some(
|
|
64
|
+
(cookieName) => getCookie(cookieName) !== null
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
PRIMA_EXPERIMENT_COOKIES,
|
|
70
|
+
PRIMA_EXPERIMENT_COOKIE_NAMES,
|
|
71
|
+
getExperimentParams,
|
|
72
|
+
hasExperimentData
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/experiment/index.ts","../../src/experiment/constants.ts","../../src/experiment/experiment-tracker.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./experiment-tracker\";\nexport * from \"./constants\";\n","/**\n * Prima PR A/B test experiment cookie names\n */\nexport const PRIMA_EXPERIMENT_COOKIES = {\n HOME: \"_prima_pr_ab_home\",\n COLLECTION: \"_prima_pr_ab_collection\",\n PRODUCT: \"_prima_pr_ab_product\",\n} as const;\n\n/**\n * Array of all Prima experiment cookie names for iteration\n */\nexport const PRIMA_EXPERIMENT_COOKIE_NAMES = Object.values(\n PRIMA_EXPERIMENT_COOKIES\n);\n","import type { ExperimentData } from \"./types\";\nimport {\n PRIMA_EXPERIMENT_COOKIES,\n PRIMA_EXPERIMENT_COOKIE_NAMES,\n} from \"./constants\";\n\n/**\n * Get cookie value by name\n */\nfunction getCookie(name: string): string | null {\n if (typeof document === \"undefined\") return null;\n\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) {\n return parts.pop()?.split(\";\").shift() || null;\n }\n return null;\n}\n\n/**\n * Get experiment parameters from cookies\n */\nexport function getExperimentParams(): ExperimentData {\n return {\n [PRIMA_EXPERIMENT_COOKIES.HOME]: getCookie(PRIMA_EXPERIMENT_COOKIES.HOME),\n [PRIMA_EXPERIMENT_COOKIES.COLLECTION]: getCookie(\n PRIMA_EXPERIMENT_COOKIES.COLLECTION\n ),\n [PRIMA_EXPERIMENT_COOKIES.PRODUCT]: getCookie(\n PRIMA_EXPERIMENT_COOKIES.PRODUCT\n ),\n };\n}\n\n/**\n * Check if any experiment data exists\n */\nexport function hasExperimentData(): boolean {\n return PRIMA_EXPERIMENT_COOKIE_NAMES.some(\n (cookieName) => getCookie(cookieName) !== null\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,2BAA2B;AAAA,EACtC,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,SAAS;AACX;AAKO,IAAM,gCAAgC,OAAO;AAAA,EAClD;AACF;;;ACLA,SAAS,UAAU,MAA6B;AAC9C,MAAI,OAAO,aAAa,YAAa,QAAO;AAE5C,QAAM,QAAQ,KAAK,SAAS,MAAM;AAClC,QAAM,QAAQ,MAAM,MAAM,KAAK,IAAI,GAAG;AACtC,MAAI,MAAM,WAAW,GAAG;AACtB,WAAO,MAAM,IAAI,GAAG,MAAM,GAAG,EAAE,MAAM,KAAK;AAAA,EAC5C;AACA,SAAO;AACT;AAKO,SAAS,sBAAsC;AACpD,SAAO;AAAA,IACL,CAAC,yBAAyB,IAAI,GAAG,UAAU,yBAAyB,IAAI;AAAA,IACxE,CAAC,yBAAyB,UAAU,GAAG;AAAA,MACrC,yBAAyB;AAAA,IAC3B;AAAA,IACA,CAAC,yBAAyB,OAAO,GAAG;AAAA,MAClC,yBAAyB;AAAA,IAC3B;AAAA,EACF;AACF;AAKO,SAAS,oBAA6B;AAC3C,SAAO,8BAA8B;AAAA,IACnC,CAAC,eAAe,UAAU,UAAU,MAAM;AAAA,EAC5C;AACF;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../chunk-NKDB4KX2.mjs";
|
|
3
|
+
import {
|
|
4
|
+
PRIMA_EXPERIMENT_COOKIES,
|
|
5
|
+
PRIMA_EXPERIMENT_COOKIE_NAMES,
|
|
6
|
+
getExperimentParams,
|
|
7
|
+
hasExperimentData
|
|
8
|
+
} from "../chunk-NGPUKV7E.mjs";
|
|
9
|
+
export {
|
|
10
|
+
PRIMA_EXPERIMENT_COOKIES,
|
|
11
|
+
PRIMA_EXPERIMENT_COOKIE_NAMES,
|
|
12
|
+
getExperimentParams,
|
|
13
|
+
hasExperimentData
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TEvent } from './types.js';
|
|
2
2
|
import { T as TrackingAdapter, a as TAdapterParams, b as IBaseAdapterParams } from './subscriber-BDAm_BAi.js';
|
|
3
|
+
import { E as ExperimentData } from './types-C__2IBCj.js';
|
|
3
4
|
import { AnalyticsEventName, ShopifyAnalyticsProduct, ShopifyPageViewPayload } from '@shopify/hydrogen-react';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -113,12 +114,23 @@ declare abstract class BaseAdapter implements TrackingAdapter {
|
|
|
113
114
|
* @returns Affiliate parameters or null if not available
|
|
114
115
|
*/
|
|
115
116
|
protected getAffiliateParams(): Record<string, string> | null;
|
|
117
|
+
/**
|
|
118
|
+
* Get experiment parameters from cookies
|
|
119
|
+
* @returns Experiment parameters
|
|
120
|
+
*/
|
|
121
|
+
protected getExperimentParams(): ExperimentData;
|
|
116
122
|
/**
|
|
117
123
|
* Enhance event parameters with affiliate data
|
|
118
124
|
* @param params The original parameters
|
|
119
125
|
* @returns Parameters enhanced with affiliate data
|
|
120
126
|
*/
|
|
121
127
|
protected enhanceWithAffiliateParams(params: Record<string, any>): Record<string, any>;
|
|
128
|
+
/**
|
|
129
|
+
* Enhance event parameters with experiment data
|
|
130
|
+
* @param params The original parameters
|
|
131
|
+
* @returns Parameters enhanced with experiment data
|
|
132
|
+
*/
|
|
133
|
+
protected enhanceWithExperimentParams(params: Record<string, any>): Record<string, any>;
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
declare global {
|
|
@@ -138,6 +150,7 @@ interface PixelAdapterConfig {
|
|
|
138
150
|
pixelId: string;
|
|
139
151
|
/**
|
|
140
152
|
* Enable server-side CAPI backup
|
|
153
|
+
* @default true - CAPI is enabled by default for better data reliability
|
|
141
154
|
*/
|
|
142
155
|
enableCAPI?: boolean;
|
|
143
156
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TEvent } from './types.mjs';
|
|
2
2
|
import { T as TrackingAdapter, a as TAdapterParams, b as IBaseAdapterParams } from './subscriber-BoyOlh9t.mjs';
|
|
3
|
+
import { E as ExperimentData } from './types-C__2IBCj.mjs';
|
|
3
4
|
import { AnalyticsEventName, ShopifyAnalyticsProduct, ShopifyPageViewPayload } from '@shopify/hydrogen-react';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -113,12 +114,23 @@ declare abstract class BaseAdapter implements TrackingAdapter {
|
|
|
113
114
|
* @returns Affiliate parameters or null if not available
|
|
114
115
|
*/
|
|
115
116
|
protected getAffiliateParams(): Record<string, string> | null;
|
|
117
|
+
/**
|
|
118
|
+
* Get experiment parameters from cookies
|
|
119
|
+
* @returns Experiment parameters
|
|
120
|
+
*/
|
|
121
|
+
protected getExperimentParams(): ExperimentData;
|
|
116
122
|
/**
|
|
117
123
|
* Enhance event parameters with affiliate data
|
|
118
124
|
* @param params The original parameters
|
|
119
125
|
* @returns Parameters enhanced with affiliate data
|
|
120
126
|
*/
|
|
121
127
|
protected enhanceWithAffiliateParams(params: Record<string, any>): Record<string, any>;
|
|
128
|
+
/**
|
|
129
|
+
* Enhance event parameters with experiment data
|
|
130
|
+
* @param params The original parameters
|
|
131
|
+
* @returns Parameters enhanced with experiment data
|
|
132
|
+
*/
|
|
133
|
+
protected enhanceWithExperimentParams(params: Record<string, any>): Record<string, any>;
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
declare global {
|
|
@@ -138,6 +150,7 @@ interface PixelAdapterConfig {
|
|
|
138
150
|
pixelId: string;
|
|
139
151
|
/**
|
|
140
152
|
* Enable server-side CAPI backup
|
|
153
|
+
* @default true - CAPI is enabled by default for better data reliability
|
|
141
154
|
*/
|
|
142
155
|
enableCAPI?: boolean;
|
|
143
156
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-
|
|
3
|
-
export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-
|
|
2
|
+
import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-th6sBtE3.mjs';
|
|
3
|
+
export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-th6sBtE3.mjs';
|
|
4
4
|
import { T as TrackingAdapter } from './subscriber-BoyOlh9t.mjs';
|
|
5
5
|
export { I as IAdapterParams, b as IBaseAdapterParams, a as TAdapterParams, e as eventSubscriber } from './subscriber-BoyOlh9t.mjs';
|
|
6
6
|
import { A as AffiliateConfig } from './affiliate-tracker-BgHwibPv.mjs';
|
|
7
7
|
export { k as AffiliateData, j as AffiliateParams, a as AffiliateTracker, i as AffiliateTrackerProps, d as captureAffiliateParams, e as clearAffiliateParams, g as getAffiliateParams, f as getAffiliateSource, h as hasAffiliateData, c as useAffiliateSource, u as useAffiliateTracker, b as useHasAffiliateData } from './affiliate-tracker-BgHwibPv.mjs';
|
|
8
8
|
export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICustomEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IMobileAddedGKEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IStartedCheckoutGKEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.mjs';
|
|
9
9
|
export { DEFAULT_CURRENCY, EventNames, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.mjs';
|
|
10
|
+
export { E as ExperimentData } from './types-C__2IBCj.mjs';
|
|
11
|
+
export { PRIMA_EXPERIMENT_COOKIES, PRIMA_EXPERIMENT_COOKIE_NAMES, getExperimentParams, hasExperimentData } from './experiment/index.mjs';
|
|
12
|
+
export { generateEventId, getBrowserInfo } from './utils/index.mjs';
|
|
13
|
+
export { FacebookCAPIConfig, FacebookCAPIService, createFacebookCAPIService } from './services/index.mjs';
|
|
10
14
|
import '@shopify/hydrogen-react';
|
|
11
15
|
|
|
12
16
|
interface ShopkitAnalyticsConfig {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-
|
|
3
|
-
export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-
|
|
2
|
+
import { G as GoogleAdapterConfig, P as PixelAdapterConfig, M as MoengageAdapterConfig, a as PostHogAdapterConfig, S as ShopifyAdapterConfig, K as KwikPassConfig, b as KwikCheckoutConfig, L as LoggerConfig } from './index-D_8w5bL_.js';
|
|
3
|
+
export { B as BaseAdapter, d as GoogleAdapter, i as KwikCheckoutAdapter, h as KwikPassAdapter, j as Logger, e as MoengageAdapter, c as PixelAdapter, f as PostHogAdapter, g as ShopifyAdapter, m as createAdapterLogger, k as createLogger, l as logger } from './index-D_8w5bL_.js';
|
|
4
4
|
import { T as TrackingAdapter } from './subscriber-BDAm_BAi.js';
|
|
5
5
|
export { I as IAdapterParams, b as IBaseAdapterParams, a as TAdapterParams, e as eventSubscriber } from './subscriber-BDAm_BAi.js';
|
|
6
6
|
import { A as AffiliateConfig } from './affiliate-tracker-BgHwibPv.js';
|
|
7
7
|
export { k as AffiliateData, j as AffiliateParams, a as AffiliateTracker, i as AffiliateTrackerProps, d as captureAffiliateParams, e as clearAffiliateParams, g as getAffiliateParams, f as getAffiliateSource, h as hasAffiliateData, c as useAffiliateSource, u as useAffiliateTracker, b as useHasAffiliateData } from './affiliate-tracker-BgHwibPv.js';
|
|
8
8
|
export { BaseEvent, EventType, IAddPaymentInfoEvent, IAddToCartEvent, IAddressAddedGKEvent, IAddressCompletedGKEvent, IAddressSelectedGKEvent, IBeginCheckoutEvent, IButtonClickEvent, ICartViewedEvent, ICheckoutCompletedEvent, ICheckoutPaymentEvent, ICheckoutStartedEvent, ICustomEvent, IFirstVisitEvent, IFormStartEvent, IFormSubmissionEvent, IMobileAddedGKEvent, IOrderCompletedEvent, IOrderPlacedEvent, IOrderSuccessEvent, IPCollectionViewEvent, IPageViewEvent, IPaymentCompletedGKEvent, IPaymentMethodSelectedGKEvent, IPinCodeAddedGKEvent, IProductViewEvent, IPurchaseEvent, IRemoveFromCartEvent, IScrollEvent, ISearchEvent, ISessionStartEvent, IStartedCheckoutGKEvent, IUserEngagementEvent, IUserLoginEvent, IUserSignupEvent, IViewContentEvent, IViewItemEvent, IViewSearchResultsEvent, IViewedProductEvent, TEvent } from './types.js';
|
|
9
9
|
export { DEFAULT_CURRENCY, EventNames, eventPublisher, initTracking, initializeEventTracking, publishEvent } from './events/index.js';
|
|
10
|
+
export { E as ExperimentData } from './types-C__2IBCj.js';
|
|
11
|
+
export { PRIMA_EXPERIMENT_COOKIES, PRIMA_EXPERIMENT_COOKIE_NAMES, getExperimentParams, hasExperimentData } from './experiment/index.js';
|
|
12
|
+
export { generateEventId, getBrowserInfo } from './utils/index.js';
|
|
13
|
+
export { FacebookCAPIConfig, FacebookCAPIService, createFacebookCAPIService } from './services/index.js';
|
|
10
14
|
import '@shopify/hydrogen-react';
|
|
11
15
|
|
|
12
16
|
interface ShopkitAnalyticsConfig {
|