@shoppexio/storefront 1.0.15 → 1.0.16

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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * UTM attribution for storefront page views.
3
+ *
4
+ * Campaign parameters only appear on the landing URL, but a visitor usually
5
+ * browses several pages before doing anything interesting. Without persistence
6
+ * every page after the first would be attributed to "direct" and the numbers
7
+ * would understate every campaign.
8
+ *
9
+ * Last-touch: a fresh set of parameters replaces the stored one, matching what
10
+ * merchants expect from analytics tools — the most recent campaign gets credit.
11
+ * Navigating without parameters keeps whatever was stored.
12
+ */
13
+ declare const UTM_KEYS: readonly ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"];
14
+ type UtmKey = (typeof UTM_KEYS)[number];
15
+ export type UtmParameters = Partial<Record<UtmKey, string>>;
16
+ /**
17
+ * Resolves the UTM parameters to report for the current page view.
18
+ *
19
+ * Reads the current URL first; when it carries any campaign parameter that set
20
+ * wins and is persisted. Otherwise the stored set is returned unchanged.
21
+ *
22
+ * @returns the parameters, or undefined when there is nothing to report
23
+ */
24
+ export declare function resolveUtmParameters(storeSlug: string): UtmParameters | undefined;
25
+ export {};
26
+ //# sourceMappingURL=attribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribution.d.ts","sourceRoot":"","sources":["../../src/core/attribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,QAAA,MAAM,QAAQ,kFAAmF,CAAC;AAElG,KAAK,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAExC,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAqE5D;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAajF"}
@@ -1 +1 @@
1
- {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/modules/analytics.ts"],"names":[],"mappings":"AAIA,wBAAsB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzF"}
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/modules/analytics.ts"],"names":[],"mappings":"AAKA,wBAAsB,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/modules/presence.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE1F;;;;GAIG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,WAAW,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA2BtF"}
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/modules/presence.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE1F;;;;GAIG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAkB5F;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,WAAW,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CA4BtF"}