@shware/analytics 8.13.0 → 8.14.0

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.
Files changed (240) hide show
  1. package/dist/attribution/classify.d.cts +6 -7
  2. package/dist/attribution/classify.d.cts.map +1 -1
  3. package/dist/attribution/classify.d.mts +6 -7
  4. package/dist/attribution/classify.d.mts.map +1 -1
  5. package/dist/attribution/vocabulary.d.cts +24 -25
  6. package/dist/attribution/vocabulary.d.cts.map +1 -1
  7. package/dist/attribution/vocabulary.d.mts +24 -25
  8. package/dist/attribution/vocabulary.d.mts.map +1 -1
  9. package/dist/click-id/index.d.cts +18 -19
  10. package/dist/click-id/index.d.cts.map +1 -1
  11. package/dist/click-id/index.d.mts +18 -19
  12. package/dist/click-id/index.d.mts.map +1 -1
  13. package/dist/constants/storage.d.cts +1 -2
  14. package/dist/constants/storage.d.cts.map +1 -1
  15. package/dist/constants/storage.d.mts +1 -2
  16. package/dist/constants/storage.d.mts.map +1 -1
  17. package/dist/feedback/index.d.cts +1 -2
  18. package/dist/feedback/index.d.cts.map +1 -1
  19. package/dist/feedback/index.d.mts +1 -2
  20. package/dist/feedback/index.d.mts.map +1 -1
  21. package/dist/hooks/use-app-analytics.d.cts +1 -2
  22. package/dist/hooks/use-app-analytics.d.cts.map +1 -1
  23. package/dist/hooks/use-app-analytics.d.mts +1 -2
  24. package/dist/hooks/use-app-analytics.d.mts.map +1 -1
  25. package/dist/hooks/use-outbound-click-analytics.d.cts +1 -2
  26. package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -1
  27. package/dist/hooks/use-outbound-click-analytics.d.mts +1 -2
  28. package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -1
  29. package/dist/hooks/use-previous.d.cts +1 -2
  30. package/dist/hooks/use-previous.d.cts.map +1 -1
  31. package/dist/hooks/use-previous.d.mts +1 -2
  32. package/dist/hooks/use-previous.d.mts.map +1 -1
  33. package/dist/hooks/use-report-web-vitals.d.cts +1 -2
  34. package/dist/hooks/use-report-web-vitals.d.cts.map +1 -1
  35. package/dist/hooks/use-report-web-vitals.d.mts +1 -2
  36. package/dist/hooks/use-report-web-vitals.d.mts.map +1 -1
  37. package/dist/hooks/use-track-impression.d.cts +1 -2
  38. package/dist/hooks/use-track-impression.d.cts.map +1 -1
  39. package/dist/hooks/use-track-impression.d.mts +1 -2
  40. package/dist/hooks/use-track-impression.d.mts.map +1 -1
  41. package/dist/hooks/use-uet-id-sync.d.cts +1 -2
  42. package/dist/hooks/use-uet-id-sync.d.cts.map +1 -1
  43. package/dist/hooks/use-uet-id-sync.d.mts +1 -2
  44. package/dist/hooks/use-uet-id-sync.d.mts.map +1 -1
  45. package/dist/hooks/use-web-analytics.d.cts +1 -2
  46. package/dist/hooks/use-web-analytics.d.cts.map +1 -1
  47. package/dist/hooks/use-web-analytics.d.mts +1 -2
  48. package/dist/hooks/use-web-analytics.d.mts.map +1 -1
  49. package/dist/link/index.d.cts +3 -4
  50. package/dist/link/index.d.cts.map +1 -1
  51. package/dist/link/index.d.mts +3 -4
  52. package/dist/link/index.d.mts.map +1 -1
  53. package/dist/native/fbsdk.d.cts +1 -2
  54. package/dist/native/fbsdk.d.cts.map +1 -1
  55. package/dist/native/fbsdk.d.mts +1 -2
  56. package/dist/native/fbsdk.d.mts.map +1 -1
  57. package/dist/native/fingerprint.d.cts +4 -5
  58. package/dist/native/fingerprint.d.cts.map +1 -1
  59. package/dist/native/fingerprint.d.mts +4 -5
  60. package/dist/native/fingerprint.d.mts.map +1 -1
  61. package/dist/native/firebase.d.cts +1 -2
  62. package/dist/native/firebase.d.cts.map +1 -1
  63. package/dist/native/firebase.d.mts +1 -2
  64. package/dist/native/firebase.d.mts.map +1 -1
  65. package/dist/native/posthog.d.cts +1 -2
  66. package/dist/native/posthog.d.cts.map +1 -1
  67. package/dist/native/posthog.d.mts +1 -2
  68. package/dist/native/posthog.d.mts.map +1 -1
  69. package/dist/native/setup.d.cts +4 -5
  70. package/dist/native/setup.d.cts.map +1 -1
  71. package/dist/native/setup.d.mts +4 -5
  72. package/dist/native/setup.d.mts.map +1 -1
  73. package/dist/next/index.cjs +14 -14
  74. package/dist/next/index.cjs.map +1 -1
  75. package/dist/next/index.d.cts +1 -2
  76. package/dist/next/index.d.cts.map +1 -1
  77. package/dist/next/index.d.mts +1 -2
  78. package/dist/next/index.d.mts.map +1 -1
  79. package/dist/next/index.mjs +3 -3
  80. package/dist/react-router/index.d.cts +1 -2
  81. package/dist/react-router/index.d.cts.map +1 -1
  82. package/dist/react-router/index.d.mts +1 -2
  83. package/dist/react-router/index.d.mts.map +1 -1
  84. package/dist/schema/index.cjs +32 -2
  85. package/dist/schema/index.cjs.map +1 -1
  86. package/dist/schema/index.d.cts +155 -18
  87. package/dist/schema/index.d.cts.map +1 -1
  88. package/dist/schema/index.d.mts +155 -18
  89. package/dist/schema/index.d.mts.map +1 -1
  90. package/dist/schema/index.mjs +32 -2
  91. package/dist/schema/index.mjs.map +1 -1
  92. package/dist/server/action-source.d.cts +3 -4
  93. package/dist/server/action-source.d.cts.map +1 -1
  94. package/dist/server/action-source.d.mts +3 -4
  95. package/dist/server/action-source.d.mts.map +1 -1
  96. package/dist/server/google-data-manager.d.cts +9 -10
  97. package/dist/server/google-data-manager.d.cts.map +1 -1
  98. package/dist/server/google-data-manager.d.mts +9 -10
  99. package/dist/server/google-data-manager.d.mts.map +1 -1
  100. package/dist/server/linkedin-conversions-api.d.cts +4 -5
  101. package/dist/server/linkedin-conversions-api.d.cts.map +1 -1
  102. package/dist/server/linkedin-conversions-api.d.mts +4 -5
  103. package/dist/server/linkedin-conversions-api.d.mts.map +1 -1
  104. package/dist/server/meta-capi.d.cts +5 -6
  105. package/dist/server/meta-capi.d.cts.map +1 -1
  106. package/dist/server/meta-capi.d.mts +5 -6
  107. package/dist/server/meta-capi.d.mts.map +1 -1
  108. package/dist/server/meta-conversions-api.d.cts +4 -5
  109. package/dist/server/meta-conversions-api.d.cts.map +1 -1
  110. package/dist/server/meta-conversions-api.d.mts +4 -5
  111. package/dist/server/meta-conversions-api.d.mts.map +1 -1
  112. package/dist/server/microsoft-conversions-api.d.cts +11 -12
  113. package/dist/server/microsoft-conversions-api.d.cts.map +1 -1
  114. package/dist/server/microsoft-conversions-api.d.mts +11 -12
  115. package/dist/server/microsoft-conversions-api.d.mts.map +1 -1
  116. package/dist/server/openai-conversions-api.d.cts +5 -6
  117. package/dist/server/openai-conversions-api.d.cts.map +1 -1
  118. package/dist/server/openai-conversions-api.d.mts +5 -6
  119. package/dist/server/openai-conversions-api.d.mts.map +1 -1
  120. package/dist/server/page-location.d.cts +1 -2
  121. package/dist/server/page-location.d.cts.map +1 -1
  122. package/dist/server/page-location.d.mts +1 -2
  123. package/dist/server/page-location.d.mts.map +1 -1
  124. package/dist/server/reddit-conversions-api.d.cts +4 -5
  125. package/dist/server/reddit-conversions-api.d.cts.map +1 -1
  126. package/dist/server/reddit-conversions-api.d.mts +4 -5
  127. package/dist/server/reddit-conversions-api.d.mts.map +1 -1
  128. package/dist/setup/index.d.cts +5 -6
  129. package/dist/setup/index.d.cts.map +1 -1
  130. package/dist/setup/index.d.mts +5 -6
  131. package/dist/setup/index.d.mts.map +1 -1
  132. package/dist/setup/session.d.cts +2 -3
  133. package/dist/setup/session.d.cts.map +1 -1
  134. package/dist/setup/session.d.mts +2 -3
  135. package/dist/setup/session.d.mts.map +1 -1
  136. package/dist/tanstack/analytics.d.cts +1 -2
  137. package/dist/tanstack/analytics.d.cts.map +1 -1
  138. package/dist/tanstack/analytics.d.mts +1 -2
  139. package/dist/tanstack/analytics.d.mts.map +1 -1
  140. package/dist/tanstack/middleware.d.cts +3 -4
  141. package/dist/tanstack/middleware.d.cts.map +1 -1
  142. package/dist/tanstack/middleware.d.mts +3 -4
  143. package/dist/tanstack/middleware.d.mts.map +1 -1
  144. package/dist/test/setup.d.cts +3 -4
  145. package/dist/test/setup.d.cts.map +1 -1
  146. package/dist/test/setup.d.mts +3 -4
  147. package/dist/test/setup.d.mts.map +1 -1
  148. package/dist/third-parties/google-analytics.d.cts +2 -3
  149. package/dist/third-parties/google-analytics.d.cts.map +1 -1
  150. package/dist/third-parties/google-analytics.d.mts +2 -3
  151. package/dist/third-parties/google-analytics.d.mts.map +1 -1
  152. package/dist/third-parties/ignored-events.d.cts +1 -2
  153. package/dist/third-parties/ignored-events.d.cts.map +1 -1
  154. package/dist/third-parties/ignored-events.d.mts +1 -2
  155. package/dist/third-parties/ignored-events.d.mts.map +1 -1
  156. package/dist/third-parties/linkedin-insight-tag.d.cts +3 -4
  157. package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
  158. package/dist/third-parties/linkedin-insight-tag.d.mts +3 -4
  159. package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
  160. package/dist/third-parties/meta-pixel.d.cts +2 -3
  161. package/dist/third-parties/meta-pixel.d.cts.map +1 -1
  162. package/dist/third-parties/meta-pixel.d.mts +2 -3
  163. package/dist/third-parties/meta-pixel.d.mts.map +1 -1
  164. package/dist/third-parties/microsoft-uet.d.cts +6 -7
  165. package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
  166. package/dist/third-parties/microsoft-uet.d.mts +6 -7
  167. package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
  168. package/dist/third-parties/openai-pixel.d.cts +2 -3
  169. package/dist/third-parties/openai-pixel.d.cts.map +1 -1
  170. package/dist/third-parties/openai-pixel.d.mts +2 -3
  171. package/dist/third-parties/openai-pixel.d.mts.map +1 -1
  172. package/dist/third-parties/posthog.d.cts +2 -3
  173. package/dist/third-parties/posthog.d.cts.map +1 -1
  174. package/dist/third-parties/posthog.d.mts +2 -3
  175. package/dist/third-parties/posthog.d.mts.map +1 -1
  176. package/dist/third-parties/reddit-pixel.d.cts +2 -3
  177. package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
  178. package/dist/third-parties/reddit-pixel.d.mts +2 -3
  179. package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
  180. package/dist/track/fbq.d.cts +10 -11
  181. package/dist/track/fbq.d.cts.map +1 -1
  182. package/dist/track/fbq.d.mts +10 -11
  183. package/dist/track/fbq.d.mts.map +1 -1
  184. package/dist/track/gtag.d.cts +26 -27
  185. package/dist/track/gtag.d.cts.map +1 -1
  186. package/dist/track/gtag.d.mts +26 -27
  187. package/dist/track/gtag.d.mts.map +1 -1
  188. package/dist/track/index.d.cts +4 -5
  189. package/dist/track/index.d.cts.map +1 -1
  190. package/dist/track/index.d.mts +4 -5
  191. package/dist/track/index.d.mts.map +1 -1
  192. package/dist/track/lintrk.d.cts +1 -2
  193. package/dist/track/lintrk.d.cts.map +1 -1
  194. package/dist/track/lintrk.d.mts +1 -2
  195. package/dist/track/lintrk.d.mts.map +1 -1
  196. package/dist/track/oaiq.d.cts +17 -18
  197. package/dist/track/oaiq.d.cts.map +1 -1
  198. package/dist/track/oaiq.d.mts +17 -18
  199. package/dist/track/oaiq.d.mts.map +1 -1
  200. package/dist/track/rdt.d.cts +10 -11
  201. package/dist/track/rdt.d.cts.map +1 -1
  202. package/dist/track/rdt.d.mts +10 -11
  203. package/dist/track/rdt.d.mts.map +1 -1
  204. package/dist/track/types.d.cts +20 -21
  205. package/dist/track/types.d.cts.map +1 -1
  206. package/dist/track/types.d.mts +20 -21
  207. package/dist/track/types.d.mts.map +1 -1
  208. package/dist/track/uetq.d.cts +8 -9
  209. package/dist/track/uetq.d.cts.map +1 -1
  210. package/dist/track/uetq.d.mts +8 -9
  211. package/dist/track/uetq.d.mts.map +1 -1
  212. package/dist/utils/field.d.cts +1 -2
  213. package/dist/utils/field.d.cts.map +1 -1
  214. package/dist/utils/field.d.mts +1 -2
  215. package/dist/utils/field.d.mts.map +1 -1
  216. package/dist/utils/sha256.d.cts +1 -2
  217. package/dist/utils/sha256.d.cts.map +1 -1
  218. package/dist/utils/sha256.d.mts +1 -2
  219. package/dist/utils/sha256.d.mts.map +1 -1
  220. package/dist/utils/stripe.d.cts +2 -3
  221. package/dist/utils/stripe.d.cts.map +1 -1
  222. package/dist/utils/stripe.d.mts +2 -3
  223. package/dist/utils/stripe.d.mts.map +1 -1
  224. package/dist/visitor/index.d.cts +2 -3
  225. package/dist/visitor/index.d.cts.map +1 -1
  226. package/dist/visitor/index.d.mts +2 -3
  227. package/dist/visitor/index.d.mts.map +1 -1
  228. package/dist/visitor/types.d.cts +4 -5
  229. package/dist/visitor/types.d.cts.map +1 -1
  230. package/dist/visitor/types.d.mts +4 -5
  231. package/dist/visitor/types.d.mts.map +1 -1
  232. package/dist/web/index.d.cts +3 -4
  233. package/dist/web/index.d.cts.map +1 -1
  234. package/dist/web/index.d.mts +3 -4
  235. package/dist/web/index.d.mts.map +1 -1
  236. package/dist/web/page-key.d.cts +1 -2
  237. package/dist/web/page-key.d.cts.map +1 -1
  238. package/dist/web/page-key.d.mts +1 -2
  239. package/dist/web/page-key.d.mts.map +1 -1
  240. package/package.json +27 -27
@@ -2,7 +2,7 @@ import { TrackTags } from "../track/types.cjs";
2
2
  import { ChannelGroup } from "./vocabulary.cjs";
3
3
  //#region src/attribution/classify.d.ts
4
4
  /** What a session's tags say about how it arrived: the touch, as the session row stores it. */
5
- interface Touch {
5
+ export interface Touch {
6
6
  /** The source, as GA calls it: a `Channel`, a `utm_source` outside the list, a referring host, or `(direct)`. */
7
7
  channel: string;
8
8
  /** How, as GA calls it: `utm_medium` as declared, else what the rule that named the channel implies; `(none)` for direct. */
@@ -15,15 +15,15 @@ interface Touch {
15
15
  priority: number | null;
16
16
  }
17
17
  /** What a product rule names, when it recognises the session; the channel group is derived. */
18
- type ProductTouch = Omit<Touch, 'channel_group'>;
18
+ export type ProductTouch = Omit<Touch, 'channel_group'>;
19
19
  /**
20
20
  * A product's own rule: a landing page convention, a code in the URL. Tried after the campaign
21
21
  * rules (utm, click id, ad landing page) and before the referrer, so a link shared on Facebook
22
22
  * or WhatsApp is credited to what the product recognises, not to the site it was shared on.
23
23
  * Returns null when the session is not one of its.
24
24
  */
25
- type TouchRule = (tags: TrackTags) => ProductTouch | null;
26
- interface ClassifyOptions {
25
+ export type TouchRule = (tags: TrackTags) => ProductTouch | null;
26
+ export interface ClassifyOptions {
27
27
  /**
28
28
  * The product's own hosts, as patterns over the lower-cased referrer host: a session that
29
29
  * starts from an internal link after the session timeout refers to them, which is navigation,
@@ -41,7 +41,7 @@ interface ClassifyOptions {
41
41
  * assistants have `organic_ai`. Checked in GA4's order — paid before organic, the organic groups before
42
42
  * email, referral last — so a pair that fits two rules lands where GA4 would put it.
43
43
  */
44
- declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
44
+ export declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
45
45
  /**
46
46
  * Reads the tags a session arrived with (its `session_start` tags) as one touch. Run once, when
47
47
  * the session is written; the result is stored, and the views only read it.
@@ -56,7 +56,6 @@ declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
56
56
  * the rule that named the channel (`TOUCH_PRIORITY`): campaign touches, then the product's own
57
57
  * as they declare, then the referrer.
58
58
  */
59
- declare function classifyTouch(tags: TrackTags, options?: ClassifyOptions): Touch;
59
+ export declare function classifyTouch(tags: TrackTags, options?: ClassifyOptions): Touch;
60
60
  //#endregion
61
- export { ClassifyOptions, ProductTouch, Touch, TouchRule, channelGroupOf, classifyTouch };
62
61
  //# sourceMappingURL=classify.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify.d.cts","names":[],"sources":["../../src/attribution/classify.ts"],"mappings":";;;;UAoBiB;;EAEf;;EAEA;;EAEA,eAAe;;EAEf;;EAEA;;;KAIU,eAAe,KAAK;;;;;;;KAQpB,aAAa,MAAM,cAAc;UAE5B;;;;;;EAMf,oBAAoB;;EAEpB,iBAAiB;;;;;;;;;;iBAgFH,eAAe,iBAAiB,iBAAiB;;;;;;;;;;;;;;;iBAmCjD,cAAc,MAAM,WAAW,UAAS,kBAAuB"}
1
+ {"version":3,"file":"classify.d.cts","names":[],"sources":["../../src/attribution/classify.ts"],"mappings":";;;;iBAoBiB;;EAEf;;EAEA;;EAEA,eAAe;;EAEf;;EAEA;;;YAIU,eAAe,KAAK;;;;;;;YAQpB,aAAa,MAAM,cAAc;iBAE5B;;;;;;EAMf,oBAAoB;;EAEpB,iBAAiB;;;;;;;;;;wBAgFH,eAAe,iBAAiB,iBAAiB;;;;;;;;;;;;;;;wBAmCjD,cAAc,MAAM,WAAW,UAAS,kBAAuB"}
@@ -2,7 +2,7 @@ import { TrackTags } from "../track/types.mjs";
2
2
  import { ChannelGroup } from "./vocabulary.mjs";
3
3
  //#region src/attribution/classify.d.ts
4
4
  /** What a session's tags say about how it arrived: the touch, as the session row stores it. */
5
- interface Touch {
5
+ export interface Touch {
6
6
  /** The source, as GA calls it: a `Channel`, a `utm_source` outside the list, a referring host, or `(direct)`. */
7
7
  channel: string;
8
8
  /** How, as GA calls it: `utm_medium` as declared, else what the rule that named the channel implies; `(none)` for direct. */
@@ -15,15 +15,15 @@ interface Touch {
15
15
  priority: number | null;
16
16
  }
17
17
  /** What a product rule names, when it recognises the session; the channel group is derived. */
18
- type ProductTouch = Omit<Touch, 'channel_group'>;
18
+ export type ProductTouch = Omit<Touch, 'channel_group'>;
19
19
  /**
20
20
  * A product's own rule: a landing page convention, a code in the URL. Tried after the campaign
21
21
  * rules (utm, click id, ad landing page) and before the referrer, so a link shared on Facebook
22
22
  * or WhatsApp is credited to what the product recognises, not to the site it was shared on.
23
23
  * Returns null when the session is not one of its.
24
24
  */
25
- type TouchRule = (tags: TrackTags) => ProductTouch | null;
26
- interface ClassifyOptions {
25
+ export type TouchRule = (tags: TrackTags) => ProductTouch | null;
26
+ export interface ClassifyOptions {
27
27
  /**
28
28
  * The product's own hosts, as patterns over the lower-cased referrer host: a session that
29
29
  * starts from an internal link after the session timeout refers to them, which is navigation,
@@ -41,7 +41,7 @@ interface ClassifyOptions {
41
41
  * assistants have `organic_ai`. Checked in GA4's order — paid before organic, the organic groups before
42
42
  * email, referral last — so a pair that fits two rules lands where GA4 would put it.
43
43
  */
44
- declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
44
+ export declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
45
45
  /**
46
46
  * Reads the tags a session arrived with (its `session_start` tags) as one touch. Run once, when
47
47
  * the session is written; the result is stored, and the views only read it.
@@ -56,7 +56,6 @@ declare function channelGroupOf(channel: string, medium: string): ChannelGroup;
56
56
  * the rule that named the channel (`TOUCH_PRIORITY`): campaign touches, then the product's own
57
57
  * as they declare, then the referrer.
58
58
  */
59
- declare function classifyTouch(tags: TrackTags, options?: ClassifyOptions): Touch;
59
+ export declare function classifyTouch(tags: TrackTags, options?: ClassifyOptions): Touch;
60
60
  //#endregion
61
- export { ClassifyOptions, ProductTouch, Touch, TouchRule, channelGroupOf, classifyTouch };
62
61
  //# sourceMappingURL=classify.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify.d.mts","names":[],"sources":["../../src/attribution/classify.ts"],"mappings":";;;;UAoBiB;;EAEf;;EAEA;;EAEA,eAAe;;EAEf;;EAEA;;;KAIU,eAAe,KAAK;;;;;;;KAQpB,aAAa,MAAM,cAAc;UAE5B;;;;;;EAMf,oBAAoB;;EAEpB,iBAAiB;;;;;;;;;;iBAgFH,eAAe,iBAAiB,iBAAiB;;;;;;;;;;;;;;;iBAmCjD,cAAc,MAAM,WAAW,UAAS,kBAAuB"}
1
+ {"version":3,"file":"classify.d.mts","names":[],"sources":["../../src/attribution/classify.ts"],"mappings":";;;;iBAoBiB;;EAEf;;EAEA;;EAEA,eAAe;;EAEf;;EAEA;;;YAIU,eAAe,KAAK;;;;;;;YAQpB,aAAa,MAAM,cAAc;iBAE5B;;;;;;EAMf,oBAAoB;;EAEpB,iBAAiB;;;;;;;;;;wBAgFH,eAAe,iBAAiB,iBAAiB;;;;;;;;;;;;;;;wBAmCjD,cAAc,MAAM,WAAW,UAAS,kBAAuB"}
@@ -6,13 +6,13 @@
6
6
  * (referrer exclusions) and its landing-page conventions.
7
7
  */
8
8
  /** A session that arrived through nothing we can name. GA's spelling, so dashboards read as GA. */
9
- declare const DIRECT_CHANNEL = "(direct)";
9
+ export declare const DIRECT_CHANNEL = "(direct)";
10
10
  /** The medium of a direct session. */
11
- declare const NO_MEDIUM = "(none)";
11
+ export declare const NO_MEDIUM = "(none)";
12
12
  /** The medium of a tagged link that named a source but no medium. */
13
- declare const MEDIUM_NOT_SET = "(not set)";
13
+ export declare const MEDIUM_NOT_SET = "(not set)";
14
14
  /** The channels the rules below can name. A `utm_source` outside this list is its own channel. */
15
- declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tiktok', 'reddit', 'linkedin', 'snapchat', 'x', 'kakao', 'yandex', 'yahoo', 'duckduckgo', 'baidu', 'ecosia', 'naver', 'brave', 'pinterest', 'youtube',
15
+ export declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tiktok', 'reddit', 'linkedin', 'snapchat', 'x', 'kakao', 'yandex', 'yahoo', 'duckduckgo', 'baidu', 'ecosia', 'naver', 'brave', 'pinterest', 'youtube',
16
16
  /** AI assistants that send people to sites: ChatGPT tags its links `utm_source=chatgpt.com`, the
17
17
  * others show as a referrer. Their own channel group, `organic_ai`, since GA4's default groups
18
18
  * would file them under Referral / Unassigned and the question "how much does AI bring" comes up. */
@@ -24,14 +24,14 @@ declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tikto
24
24
  * `referral`: that word is the channel group of any outside site, and a channel of the same name
25
25
  * would be impossible to tell apart in queries. */
26
26
  'referral_program'];
27
- type Channel = (typeof CHANNELS)[number];
27
+ export type Channel = (typeof CHANNELS)[number];
28
28
  /** GA4's default channel groups, as identifiers; a dashboard maps them to display names. */
29
- declare const CHANNEL_GROUPS: readonly ['direct', 'paid_search', 'paid_social', 'paid_other', 'display', 'organic_search', 'organic_social', 'organic_video',
29
+ export declare const CHANNEL_GROUPS: readonly ['direct', 'paid_search', 'paid_social', 'paid_other', 'display', 'organic_search', 'organic_social', 'organic_video',
30
30
  /** not in GA4's default grouping: sessions an AI assistant sent, by referrer or by ChatGPT's utm */
31
31
  'organic_ai', 'referral', 'email', 'affiliate', 'unassigned'];
32
- type ChannelGroup = (typeof CHANNEL_GROUPS)[number];
32
+ export type ChannelGroup = (typeof CHANNEL_GROUPS)[number];
33
33
  /** `utm_source` spellings that mean the same channel: Meta's `{{site_source_name}}` values and the usual synonyms. */
34
- declare const SOURCE_ALIASES: {
34
+ export declare const SOURCE_ALIASES: {
35
35
  readonly fb: 'meta';
36
36
  readonly ig: 'meta';
37
37
  readonly an: 'meta';
@@ -58,14 +58,14 @@ declare const SOURCE_ALIASES: {
58
58
  * collects (`AdvertisingInfo`); `fbp` and `rdt_uuid` are deliberately absent — they are pixel
59
59
  * browser ids, present with or without a click.
60
60
  */
61
- declare const CLICK_ID_CHANNELS: readonly [readonly ["fbclid", "meta"], readonly ["fbc", "meta"], readonly ["gclid", "google"], readonly ["gbraid", "google"], readonly ["wbraid", "google"], readonly ["gad_source", "google"], readonly ["gad_campaignid", "google"], readonly ["dclid", "dv360"], readonly ["msclkid", "microsoft"], readonly ["ttclid", "tiktok"], readonly ["rdt_cid", "reddit"], readonly ["li_fat_id", "linkedin"], readonly ["sccid", "snapchat"], readonly ["twclid", "x"], readonly ["ko_click_id", "kakao"], readonly ["yclid", "yandex"]];
61
+ export declare const CLICK_ID_CHANNELS: readonly [readonly ["fbclid", "meta"], readonly ["fbc", "meta"], readonly ["gclid", "google"], readonly ["gbraid", "google"], readonly ["wbraid", "google"], readonly ["gad_source", "google"], readonly ["gad_campaignid", "google"], readonly ["dclid", "dv360"], readonly ["msclkid", "microsoft"], readonly ["ttclid", "tiktok"], readonly ["rdt_cid", "reddit"], readonly ["li_fat_id", "linkedin"], readonly ["sccid", "snapchat"], readonly ["twclid", "x"], readonly ["ko_click_id", "kakao"], readonly ["yclid", "yandex"]];
62
62
  /**
63
63
  * A landing page reserved for one channel's ads, for ads that lost their parameters:
64
64
  * `/lp/<channel>`, with or without host, query and hash; the capture is the channel. A product
65
65
  * that names its landing pages differently replaces this.
66
66
  */
67
- declare const AD_LANDING_PAGE: RegExp;
68
- type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
67
+ export declare const AD_LANDING_PAGE: RegExp;
68
+ export type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
69
69
  /**
70
70
  * Referrer hosts that name a channel, as regular expressions over the lower-cased host,
71
71
  * with the medium GA4 gives that kind of site. Anything else that refers is `referral`, kept as
@@ -74,7 +74,7 @@ type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
74
74
  * first, because `gemini.google.com`, `copilot.microsoft.com` and `yiyan.baidu.com` would
75
75
  * otherwise be Google, Microsoft and Baidu search.
76
76
  */
77
- declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], readonly ["perplexity", "ai", RegExp], readonly ["gemini", "ai", RegExp], readonly ["claude", "ai", RegExp], readonly ["copilot", "ai", RegExp], readonly ["grok", "ai", RegExp], readonly ["deepseek", "ai", RegExp], readonly ["doubao", "ai", RegExp], readonly ["kimi", "ai", RegExp], readonly ["qwen", "ai", RegExp], readonly ["yuanbao", "ai", RegExp], readonly ["ernie", "ai", RegExp], readonly ["zhipu", "ai", RegExp], readonly ["google", "organic", RegExp], readonly ["microsoft", "organic", RegExp], readonly ["yahoo", "organic", RegExp], readonly ["duckduckgo", "organic", RegExp], readonly ["baidu", "organic", RegExp], readonly ["yandex", "organic", RegExp], readonly ["ecosia", "organic", RegExp], readonly ["naver", "organic", RegExp], readonly ["brave", "organic", RegExp], readonly ["meta", "social", RegExp], readonly ["x", "social", RegExp], readonly ["linkedin", "social", RegExp], readonly ["reddit", "social", RegExp], readonly ["tiktok", "social", RegExp], readonly ["pinterest", "social", RegExp], readonly ["snapchat", "social", RegExp], readonly ["youtube", "video", RegExp]];
77
+ export declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], readonly ["perplexity", "ai", RegExp], readonly ["gemini", "ai", RegExp], readonly ["claude", "ai", RegExp], readonly ["copilot", "ai", RegExp], readonly ["grok", "ai", RegExp], readonly ["deepseek", "ai", RegExp], readonly ["doubao", "ai", RegExp], readonly ["kimi", "ai", RegExp], readonly ["qwen", "ai", RegExp], readonly ["yuanbao", "ai", RegExp], readonly ["ernie", "ai", RegExp], readonly ["zhipu", "ai", RegExp], readonly ["google", "organic", RegExp], readonly ["microsoft", "organic", RegExp], readonly ["yahoo", "organic", RegExp], readonly ["duckduckgo", "organic", RegExp], readonly ["baidu", "organic", RegExp], readonly ["yandex", "organic", RegExp], readonly ["ecosia", "organic", RegExp], readonly ["naver", "organic", RegExp], readonly ["brave", "organic", RegExp], readonly ["meta", "social", RegExp], readonly ["x", "social", RegExp], readonly ["linkedin", "social", RegExp], readonly ["reddit", "social", RegExp], readonly ["tiktok", "social", RegExp], readonly ["pinterest", "social", RegExp], readonly ["snapchat", "social", RegExp], readonly ["youtube", "video", RegExp]];
78
78
  /**
79
79
  * Referrer hosts that are navigation, not acquisition, when a session happens to start on the way
80
80
  * back from them: the local dev host; the payment providers a visitor is bounced through; the
@@ -87,9 +87,9 @@ declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], read
87
87
  * LinkedIn, GitHub, Discord — cannot be told apart by host (referrer policies strip the path) and
88
88
  * are left as the referrers they usually are. Regular expressions over the lower-cased host.
89
89
  */
90
- declare const REFERRERS_NOT_A_TOUCH: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
90
+ export declare const REFERRERS_NOT_A_TOUCH: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
91
91
  /** GA4's paid mediums — cpc, cpm, ppc, retargeting, paid_social, … — plus Performance Max. */
92
- declare const PAID_MEDIUM: RegExp;
92
+ export declare const PAID_MEDIUM: RegExp;
93
93
  /**
94
94
  * Meta's `{{placement}}` values, lower-cased, which an ad URL template of `utm_medium={{placement}}`
95
95
  * puts in the medium. Only an ad carries one — an organic post arrives as a referrer, with no utm
@@ -100,18 +100,18 @@ declare const PAID_MEDIUM: RegExp;
100
100
  * here. Meta's documented values plus the ones seen in the wild (`facebook_mobile_reels`,
101
101
  * `facebook_notification`, `an`), and the literal macro for a template that did not expand it.
102
102
  */
103
- declare const META_PLACEMENTS: readonly ['facebook_desktop_feed', 'facebook_mobile_feed', 'facebook_mobile_reels', 'facebook_reels', 'facebook_reels_overlay', 'facebook_right_column', 'facebook_marketplace', 'facebook_video_feeds', 'facebook_stories', 'facebook_search', 'facebook_instream_video', 'facebook_instant_article', 'facebook_groups_feed', 'facebook_profile_feed', 'facebook_notification', 'facebook_notifications', 'facebook_business_explore', 'instagram_feed', 'instagram_stories', 'instagram_reels', 'instagram_reels_overlay', 'instagram_explore', 'instagram_explore_home', 'instagram_search', 'instagram_shop', 'instagram_profile_feed', 'instagram_profile_reels', 'instagram_igtv', 'messenger_inbox', 'messenger_stories', 'messenger_sponsored_messages', 'threads_feed', 'whatsapp_status', 'audience_network_classic', 'audience_network_rewarded_video', 'audience_network_native_banner_and_interstitial', 'an', 'others',
103
+ export declare const META_PLACEMENTS: readonly ['facebook_desktop_feed', 'facebook_mobile_feed', 'facebook_mobile_reels', 'facebook_reels', 'facebook_reels_overlay', 'facebook_right_column', 'facebook_marketplace', 'facebook_video_feeds', 'facebook_stories', 'facebook_search', 'facebook_instream_video', 'facebook_instant_article', 'facebook_groups_feed', 'facebook_profile_feed', 'facebook_notification', 'facebook_notifications', 'facebook_business_explore', 'instagram_feed', 'instagram_stories', 'instagram_reels', 'instagram_reels_overlay', 'instagram_explore', 'instagram_explore_home', 'instagram_search', 'instagram_shop', 'instagram_profile_feed', 'instagram_profile_reels', 'instagram_igtv', 'messenger_inbox', 'messenger_stories', 'messenger_sponsored_messages', 'threads_feed', 'whatsapp_status', 'audience_network_classic', 'audience_network_rewarded_video', 'audience_network_native_banner_and_interstitial', 'an', 'others',
104
104
  /** the macro itself, when Meta did not expand it (written in a field it does not substitute, or a
105
105
  * preview click): still only ever produced by a Meta ad URL, so still a paid Meta click */
106
106
  '{{placement}}'];
107
- declare const DISPLAY_MEDIUMS: readonly ['display', 'banner', 'expandable', 'interstitial'];
107
+ export declare const DISPLAY_MEDIUMS: readonly ['display', 'banner', 'expandable', 'interstitial'];
108
108
  /** GA4's email spellings, as a source or a medium. */
109
- declare const EMAIL_MEDIUMS: readonly ['email', 'e-mail', 'e_mail', 'e mail'];
109
+ export declare const EMAIL_MEDIUMS: readonly ['email', 'e-mail', 'e_mail', 'e mail'];
110
110
  /** A medium that says email or newsletter anywhere in it: `outbound email`, `cold_email`, `newsletter`, and GA4's four. */
111
- declare const EMAIL_MEDIUM: RegExp;
111
+ export declare const EMAIL_MEDIUM: RegExp;
112
112
  /** Where a touch came from: a tracked session, or a report by the user or staff. */
113
- declare const TOUCH_SOURCES: readonly ['tracked', 'reported'];
114
- type TouchSource = (typeof TOUCH_SOURCES)[number];
113
+ export declare const TOUCH_SOURCES: readonly ['tracked', 'reported'];
114
+ export type TouchSource = (typeof TOUCH_SOURCES)[number];
115
115
  /**
116
116
  * How a reported touch was learned:
117
117
  * - survey: the user answered "how did you hear about us" (onboarding, checkout)
@@ -119,8 +119,8 @@ type TouchSource = (typeof TOUCH_SOURCES)[number];
119
119
  * - phone: a call came in on a channel's dedicated number, marked by staff or the phone system
120
120
  * - manual: staff recorded what a customer told them
121
121
  */
122
- declare const REPORTED_TOUCH_KINDS: readonly ['survey', 'promo_code', 'phone', 'manual'];
123
- type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
122
+ export declare const REPORTED_TOUCH_KINDS: readonly ['survey', 'promo_code', 'phone', 'manual'];
123
+ export type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
124
124
  /**
125
125
  * How much a touch is worth against another when attribution has to choose between sessions;
126
126
  * lower wins, and the latest wins among equals. Stored on the session when it is classified, so
@@ -132,7 +132,7 @@ type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
132
132
  * So two sessions tagged with utm and gclid respectively are equal here (both `campaign`) and the
133
133
  * later one is credited, while one session carrying both is named by its utm.
134
134
  */
135
- declare const TOUCH_PRIORITY: {
135
+ export declare const TOUCH_PRIORITY: {
136
136
  /** utm, click id, ad landing page: someone tagged that link (in that order within a session) */
137
137
  readonly campaign: 1;
138
138
  /** a reported touch staff stand behind: a call on a channel's number, a recorded conversation */
@@ -143,12 +143,11 @@ declare const TOUCH_PRIORITY: {
143
143
  readonly claimed: 3;
144
144
  };
145
145
  /** Which reported kinds are staff facts and which are the user's claims. */
146
- declare const REPORTED_TOUCH_PRIORITY: {
146
+ export declare const REPORTED_TOUCH_PRIORITY: {
147
147
  readonly phone: 1;
148
148
  readonly manual: 1;
149
149
  readonly survey: 3;
150
150
  readonly promo_code: 3;
151
151
  };
152
152
  //#endregion
153
- export { AD_LANDING_PAGE, CHANNELS, CHANNEL_GROUPS, CLICK_ID_CHANNELS, Channel, ChannelGroup, DIRECT_CHANNEL, DISPLAY_MEDIUMS, EMAIL_MEDIUM, EMAIL_MEDIUMS, MEDIUM_NOT_SET, META_PLACEMENTS, NO_MEDIUM, PAID_MEDIUM, REFERRERS_NOT_A_TOUCH, REFERRER_SITES, REPORTED_TOUCH_KINDS, REPORTED_TOUCH_PRIORITY, ReferrerMedium, ReportedTouchKind, SOURCE_ALIASES, TOUCH_PRIORITY, TOUCH_SOURCES, TouchSource };
154
153
  //# sourceMappingURL=vocabulary.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.cts","names":[],"sources":["../../src/attribution/vocabulary.ts"],"mappings":";;;;;;;;cAUa;;cAEA;;cAEA;;cAGA;;;;;;;;;;;;KA4CD,kBAAkB;;cAGjB;;;KAiBD,uBAAuB;;cAGtB;WACP;WACA;WACA;WACC;WACK;WACC;WACL;WACG;WACK;WACH;WACF;WACM;WACI;WACX;WACS;WACJ;WACE;WACC;WACF;WACF;;;;;;;cAQD;;;;;;cAwBA,iBAAe;KAEhB;;;;;;;;;cAUC,qDAAc,uCAAA,mCAAA,mCAAA,oCAAA,iCAAA,qCAAA,mCAAA,iCAAA,iCAAA,oCAAA,kCAAA,kCAAA,wCAAA,2CAAA,uCAAA,4CAAA,uCAAA,wCAAA,wCAAA,uCAAA,uCAAA,qCAAA,kCAAA,yCAAA,uCAAA,uCAAA,0CAAA,yCAAA,uCAAA;;;;;;;;;;;;;cA6Cd,iCAAqB,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA;;cAgCrB,aAAW;;;;;;;;;;;cAWX;;;;cA2CA;;cAEA;;cAEA,cAAY;;cAGZ;KACD,sBAAsB;;;;;;;;cASrB;KACD,4BAA4B;;;;;;;;;;;;cAa3B;;WAED;;WAEA;;WAEA;;WAED;;;cAIE"}
1
+ {"version":3,"file":"vocabulary.d.cts","names":[],"sources":["../../src/attribution/vocabulary.ts"],"mappings":";;;;;;;;qBAUa;;qBAEA;;qBAEA;;qBAGA;;;;;;;;;;;;YA4CD,kBAAkB;;qBAGjB;;;YAiBD,uBAAuB;;qBAGtB;WACP;WACA;WACA;WACC;WACK;WACC;WACL;WACG;WACK;WACH;WACF;WACM;WACI;WACX;WACS;WACJ;WACE;WACC;WACF;WACF;;;;;;;qBAQD;;;;;;qBAwBA,iBAAe;YAEhB;;;;;;;;;qBAUC,qDAAc,uCAAA,mCAAA,mCAAA,oCAAA,iCAAA,qCAAA,mCAAA,iCAAA,iCAAA,oCAAA,kCAAA,kCAAA,wCAAA,2CAAA,uCAAA,4CAAA,uCAAA,wCAAA,wCAAA,uCAAA,uCAAA,qCAAA,kCAAA,yCAAA,uCAAA,uCAAA,0CAAA,yCAAA,uCAAA;;;;;;;;;;;;;qBA6Cd,iCAAqB,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA;;qBAgCrB,aAAW;;;;;;;;;;;qBAWX;;;;qBA2CA;;qBAEA;;qBAEA,cAAY;;qBAGZ;YACD,sBAAsB;;;;;;;;qBASrB;YACD,4BAA4B;;;;;;;;;;;;qBAa3B;;WAED;;WAEA;;WAEA;;WAED;;;qBAIE"}
@@ -6,13 +6,13 @@
6
6
  * (referrer exclusions) and its landing-page conventions.
7
7
  */
8
8
  /** A session that arrived through nothing we can name. GA's spelling, so dashboards read as GA. */
9
- declare const DIRECT_CHANNEL = "(direct)";
9
+ export declare const DIRECT_CHANNEL = "(direct)";
10
10
  /** The medium of a direct session. */
11
- declare const NO_MEDIUM = "(none)";
11
+ export declare const NO_MEDIUM = "(none)";
12
12
  /** The medium of a tagged link that named a source but no medium. */
13
- declare const MEDIUM_NOT_SET = "(not set)";
13
+ export declare const MEDIUM_NOT_SET = "(not set)";
14
14
  /** The channels the rules below can name. A `utm_source` outside this list is its own channel. */
15
- declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tiktok', 'reddit', 'linkedin', 'snapchat', 'x', 'kakao', 'yandex', 'yahoo', 'duckduckgo', 'baidu', 'ecosia', 'naver', 'brave', 'pinterest', 'youtube',
15
+ export declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tiktok', 'reddit', 'linkedin', 'snapchat', 'x', 'kakao', 'yandex', 'yahoo', 'duckduckgo', 'baidu', 'ecosia', 'naver', 'brave', 'pinterest', 'youtube',
16
16
  /** AI assistants that send people to sites: ChatGPT tags its links `utm_source=chatgpt.com`, the
17
17
  * others show as a referrer. Their own channel group, `organic_ai`, since GA4's default groups
18
18
  * would file them under Referral / Unassigned and the question "how much does AI bring" comes up. */
@@ -24,14 +24,14 @@ declare const CHANNELS: readonly ['meta', 'google', 'dv360', 'microsoft', 'tikto
24
24
  * `referral`: that word is the channel group of any outside site, and a channel of the same name
25
25
  * would be impossible to tell apart in queries. */
26
26
  'referral_program'];
27
- type Channel = (typeof CHANNELS)[number];
27
+ export type Channel = (typeof CHANNELS)[number];
28
28
  /** GA4's default channel groups, as identifiers; a dashboard maps them to display names. */
29
- declare const CHANNEL_GROUPS: readonly ['direct', 'paid_search', 'paid_social', 'paid_other', 'display', 'organic_search', 'organic_social', 'organic_video',
29
+ export declare const CHANNEL_GROUPS: readonly ['direct', 'paid_search', 'paid_social', 'paid_other', 'display', 'organic_search', 'organic_social', 'organic_video',
30
30
  /** not in GA4's default grouping: sessions an AI assistant sent, by referrer or by ChatGPT's utm */
31
31
  'organic_ai', 'referral', 'email', 'affiliate', 'unassigned'];
32
- type ChannelGroup = (typeof CHANNEL_GROUPS)[number];
32
+ export type ChannelGroup = (typeof CHANNEL_GROUPS)[number];
33
33
  /** `utm_source` spellings that mean the same channel: Meta's `{{site_source_name}}` values and the usual synonyms. */
34
- declare const SOURCE_ALIASES: {
34
+ export declare const SOURCE_ALIASES: {
35
35
  readonly fb: 'meta';
36
36
  readonly ig: 'meta';
37
37
  readonly an: 'meta';
@@ -58,14 +58,14 @@ declare const SOURCE_ALIASES: {
58
58
  * collects (`AdvertisingInfo`); `fbp` and `rdt_uuid` are deliberately absent — they are pixel
59
59
  * browser ids, present with or without a click.
60
60
  */
61
- declare const CLICK_ID_CHANNELS: readonly [readonly ["fbclid", "meta"], readonly ["fbc", "meta"], readonly ["gclid", "google"], readonly ["gbraid", "google"], readonly ["wbraid", "google"], readonly ["gad_source", "google"], readonly ["gad_campaignid", "google"], readonly ["dclid", "dv360"], readonly ["msclkid", "microsoft"], readonly ["ttclid", "tiktok"], readonly ["rdt_cid", "reddit"], readonly ["li_fat_id", "linkedin"], readonly ["sccid", "snapchat"], readonly ["twclid", "x"], readonly ["ko_click_id", "kakao"], readonly ["yclid", "yandex"]];
61
+ export declare const CLICK_ID_CHANNELS: readonly [readonly ["fbclid", "meta"], readonly ["fbc", "meta"], readonly ["gclid", "google"], readonly ["gbraid", "google"], readonly ["wbraid", "google"], readonly ["gad_source", "google"], readonly ["gad_campaignid", "google"], readonly ["dclid", "dv360"], readonly ["msclkid", "microsoft"], readonly ["ttclid", "tiktok"], readonly ["rdt_cid", "reddit"], readonly ["li_fat_id", "linkedin"], readonly ["sccid", "snapchat"], readonly ["twclid", "x"], readonly ["ko_click_id", "kakao"], readonly ["yclid", "yandex"]];
62
62
  /**
63
63
  * A landing page reserved for one channel's ads, for ads that lost their parameters:
64
64
  * `/lp/<channel>`, with or without host, query and hash; the capture is the channel. A product
65
65
  * that names its landing pages differently replaces this.
66
66
  */
67
- declare const AD_LANDING_PAGE: RegExp;
68
- type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
67
+ export declare const AD_LANDING_PAGE: RegExp;
68
+ export type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
69
69
  /**
70
70
  * Referrer hosts that name a channel, as regular expressions over the lower-cased host,
71
71
  * with the medium GA4 gives that kind of site. Anything else that refers is `referral`, kept as
@@ -74,7 +74,7 @@ type ReferrerMedium = 'organic' | 'social' | 'video' | 'ai';
74
74
  * first, because `gemini.google.com`, `copilot.microsoft.com` and `yiyan.baidu.com` would
75
75
  * otherwise be Google, Microsoft and Baidu search.
76
76
  */
77
- declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], readonly ["perplexity", "ai", RegExp], readonly ["gemini", "ai", RegExp], readonly ["claude", "ai", RegExp], readonly ["copilot", "ai", RegExp], readonly ["grok", "ai", RegExp], readonly ["deepseek", "ai", RegExp], readonly ["doubao", "ai", RegExp], readonly ["kimi", "ai", RegExp], readonly ["qwen", "ai", RegExp], readonly ["yuanbao", "ai", RegExp], readonly ["ernie", "ai", RegExp], readonly ["zhipu", "ai", RegExp], readonly ["google", "organic", RegExp], readonly ["microsoft", "organic", RegExp], readonly ["yahoo", "organic", RegExp], readonly ["duckduckgo", "organic", RegExp], readonly ["baidu", "organic", RegExp], readonly ["yandex", "organic", RegExp], readonly ["ecosia", "organic", RegExp], readonly ["naver", "organic", RegExp], readonly ["brave", "organic", RegExp], readonly ["meta", "social", RegExp], readonly ["x", "social", RegExp], readonly ["linkedin", "social", RegExp], readonly ["reddit", "social", RegExp], readonly ["tiktok", "social", RegExp], readonly ["pinterest", "social", RegExp], readonly ["snapchat", "social", RegExp], readonly ["youtube", "video", RegExp]];
77
+ export declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], readonly ["perplexity", "ai", RegExp], readonly ["gemini", "ai", RegExp], readonly ["claude", "ai", RegExp], readonly ["copilot", "ai", RegExp], readonly ["grok", "ai", RegExp], readonly ["deepseek", "ai", RegExp], readonly ["doubao", "ai", RegExp], readonly ["kimi", "ai", RegExp], readonly ["qwen", "ai", RegExp], readonly ["yuanbao", "ai", RegExp], readonly ["ernie", "ai", RegExp], readonly ["zhipu", "ai", RegExp], readonly ["google", "organic", RegExp], readonly ["microsoft", "organic", RegExp], readonly ["yahoo", "organic", RegExp], readonly ["duckduckgo", "organic", RegExp], readonly ["baidu", "organic", RegExp], readonly ["yandex", "organic", RegExp], readonly ["ecosia", "organic", RegExp], readonly ["naver", "organic", RegExp], readonly ["brave", "organic", RegExp], readonly ["meta", "social", RegExp], readonly ["x", "social", RegExp], readonly ["linkedin", "social", RegExp], readonly ["reddit", "social", RegExp], readonly ["tiktok", "social", RegExp], readonly ["pinterest", "social", RegExp], readonly ["snapchat", "social", RegExp], readonly ["youtube", "video", RegExp]];
78
78
  /**
79
79
  * Referrer hosts that are navigation, not acquisition, when a session happens to start on the way
80
80
  * back from them: the local dev host; the payment providers a visitor is bounced through; the
@@ -87,9 +87,9 @@ declare const REFERRER_SITES: readonly [readonly ["chatgpt", "ai", RegExp], read
87
87
  * LinkedIn, GitHub, Discord — cannot be told apart by host (referrer policies strip the path) and
88
88
  * are left as the referrers they usually are. Regular expressions over the lower-cased host.
89
89
  */
90
- declare const REFERRERS_NOT_A_TOUCH: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
90
+ export declare const REFERRERS_NOT_A_TOUCH: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
91
91
  /** GA4's paid mediums — cpc, cpm, ppc, retargeting, paid_social, … — plus Performance Max. */
92
- declare const PAID_MEDIUM: RegExp;
92
+ export declare const PAID_MEDIUM: RegExp;
93
93
  /**
94
94
  * Meta's `{{placement}}` values, lower-cased, which an ad URL template of `utm_medium={{placement}}`
95
95
  * puts in the medium. Only an ad carries one — an organic post arrives as a referrer, with no utm
@@ -100,18 +100,18 @@ declare const PAID_MEDIUM: RegExp;
100
100
  * here. Meta's documented values plus the ones seen in the wild (`facebook_mobile_reels`,
101
101
  * `facebook_notification`, `an`), and the literal macro for a template that did not expand it.
102
102
  */
103
- declare const META_PLACEMENTS: readonly ['facebook_desktop_feed', 'facebook_mobile_feed', 'facebook_mobile_reels', 'facebook_reels', 'facebook_reels_overlay', 'facebook_right_column', 'facebook_marketplace', 'facebook_video_feeds', 'facebook_stories', 'facebook_search', 'facebook_instream_video', 'facebook_instant_article', 'facebook_groups_feed', 'facebook_profile_feed', 'facebook_notification', 'facebook_notifications', 'facebook_business_explore', 'instagram_feed', 'instagram_stories', 'instagram_reels', 'instagram_reels_overlay', 'instagram_explore', 'instagram_explore_home', 'instagram_search', 'instagram_shop', 'instagram_profile_feed', 'instagram_profile_reels', 'instagram_igtv', 'messenger_inbox', 'messenger_stories', 'messenger_sponsored_messages', 'threads_feed', 'whatsapp_status', 'audience_network_classic', 'audience_network_rewarded_video', 'audience_network_native_banner_and_interstitial', 'an', 'others',
103
+ export declare const META_PLACEMENTS: readonly ['facebook_desktop_feed', 'facebook_mobile_feed', 'facebook_mobile_reels', 'facebook_reels', 'facebook_reels_overlay', 'facebook_right_column', 'facebook_marketplace', 'facebook_video_feeds', 'facebook_stories', 'facebook_search', 'facebook_instream_video', 'facebook_instant_article', 'facebook_groups_feed', 'facebook_profile_feed', 'facebook_notification', 'facebook_notifications', 'facebook_business_explore', 'instagram_feed', 'instagram_stories', 'instagram_reels', 'instagram_reels_overlay', 'instagram_explore', 'instagram_explore_home', 'instagram_search', 'instagram_shop', 'instagram_profile_feed', 'instagram_profile_reels', 'instagram_igtv', 'messenger_inbox', 'messenger_stories', 'messenger_sponsored_messages', 'threads_feed', 'whatsapp_status', 'audience_network_classic', 'audience_network_rewarded_video', 'audience_network_native_banner_and_interstitial', 'an', 'others',
104
104
  /** the macro itself, when Meta did not expand it (written in a field it does not substitute, or a
105
105
  * preview click): still only ever produced by a Meta ad URL, so still a paid Meta click */
106
106
  '{{placement}}'];
107
- declare const DISPLAY_MEDIUMS: readonly ['display', 'banner', 'expandable', 'interstitial'];
107
+ export declare const DISPLAY_MEDIUMS: readonly ['display', 'banner', 'expandable', 'interstitial'];
108
108
  /** GA4's email spellings, as a source or a medium. */
109
- declare const EMAIL_MEDIUMS: readonly ['email', 'e-mail', 'e_mail', 'e mail'];
109
+ export declare const EMAIL_MEDIUMS: readonly ['email', 'e-mail', 'e_mail', 'e mail'];
110
110
  /** A medium that says email or newsletter anywhere in it: `outbound email`, `cold_email`, `newsletter`, and GA4's four. */
111
- declare const EMAIL_MEDIUM: RegExp;
111
+ export declare const EMAIL_MEDIUM: RegExp;
112
112
  /** Where a touch came from: a tracked session, or a report by the user or staff. */
113
- declare const TOUCH_SOURCES: readonly ['tracked', 'reported'];
114
- type TouchSource = (typeof TOUCH_SOURCES)[number];
113
+ export declare const TOUCH_SOURCES: readonly ['tracked', 'reported'];
114
+ export type TouchSource = (typeof TOUCH_SOURCES)[number];
115
115
  /**
116
116
  * How a reported touch was learned:
117
117
  * - survey: the user answered "how did you hear about us" (onboarding, checkout)
@@ -119,8 +119,8 @@ type TouchSource = (typeof TOUCH_SOURCES)[number];
119
119
  * - phone: a call came in on a channel's dedicated number, marked by staff or the phone system
120
120
  * - manual: staff recorded what a customer told them
121
121
  */
122
- declare const REPORTED_TOUCH_KINDS: readonly ['survey', 'promo_code', 'phone', 'manual'];
123
- type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
122
+ export declare const REPORTED_TOUCH_KINDS: readonly ['survey', 'promo_code', 'phone', 'manual'];
123
+ export type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
124
124
  /**
125
125
  * How much a touch is worth against another when attribution has to choose between sessions;
126
126
  * lower wins, and the latest wins among equals. Stored on the session when it is classified, so
@@ -132,7 +132,7 @@ type ReportedTouchKind = (typeof REPORTED_TOUCH_KINDS)[number];
132
132
  * So two sessions tagged with utm and gclid respectively are equal here (both `campaign`) and the
133
133
  * later one is credited, while one session carrying both is named by its utm.
134
134
  */
135
- declare const TOUCH_PRIORITY: {
135
+ export declare const TOUCH_PRIORITY: {
136
136
  /** utm, click id, ad landing page: someone tagged that link (in that order within a session) */
137
137
  readonly campaign: 1;
138
138
  /** a reported touch staff stand behind: a call on a channel's number, a recorded conversation */
@@ -143,12 +143,11 @@ declare const TOUCH_PRIORITY: {
143
143
  readonly claimed: 3;
144
144
  };
145
145
  /** Which reported kinds are staff facts and which are the user's claims. */
146
- declare const REPORTED_TOUCH_PRIORITY: {
146
+ export declare const REPORTED_TOUCH_PRIORITY: {
147
147
  readonly phone: 1;
148
148
  readonly manual: 1;
149
149
  readonly survey: 3;
150
150
  readonly promo_code: 3;
151
151
  };
152
152
  //#endregion
153
- export { AD_LANDING_PAGE, CHANNELS, CHANNEL_GROUPS, CLICK_ID_CHANNELS, Channel, ChannelGroup, DIRECT_CHANNEL, DISPLAY_MEDIUMS, EMAIL_MEDIUM, EMAIL_MEDIUMS, MEDIUM_NOT_SET, META_PLACEMENTS, NO_MEDIUM, PAID_MEDIUM, REFERRERS_NOT_A_TOUCH, REFERRER_SITES, REPORTED_TOUCH_KINDS, REPORTED_TOUCH_PRIORITY, ReferrerMedium, ReportedTouchKind, SOURCE_ALIASES, TOUCH_PRIORITY, TOUCH_SOURCES, TouchSource };
154
153
  //# sourceMappingURL=vocabulary.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.mts","names":[],"sources":["../../src/attribution/vocabulary.ts"],"mappings":";;;;;;;;cAUa;;cAEA;;cAEA;;cAGA;;;;;;;;;;;;KA4CD,kBAAkB;;cAGjB;;;KAiBD,uBAAuB;;cAGtB;WACP;WACA;WACA;WACC;WACK;WACC;WACL;WACG;WACK;WACH;WACF;WACM;WACI;WACX;WACS;WACJ;WACE;WACC;WACF;WACF;;;;;;;cAQD;;;;;;cAwBA,iBAAe;KAEhB;;;;;;;;;cAUC,qDAAc,uCAAA,mCAAA,mCAAA,oCAAA,iCAAA,qCAAA,mCAAA,iCAAA,iCAAA,oCAAA,kCAAA,kCAAA,wCAAA,2CAAA,uCAAA,4CAAA,uCAAA,wCAAA,wCAAA,uCAAA,uCAAA,qCAAA,kCAAA,yCAAA,uCAAA,uCAAA,0CAAA,yCAAA,uCAAA;;;;;;;;;;;;;cA6Cd,iCAAqB,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA;;cAgCrB,aAAW;;;;;;;;;;;cAWX;;;;cA2CA;;cAEA;;cAEA,cAAY;;cAGZ;KACD,sBAAsB;;;;;;;;cASrB;KACD,4BAA4B;;;;;;;;;;;;cAa3B;;WAED;;WAEA;;WAEA;;WAED;;;cAIE"}
1
+ {"version":3,"file":"vocabulary.d.mts","names":[],"sources":["../../src/attribution/vocabulary.ts"],"mappings":";;;;;;;;qBAUa;;qBAEA;;qBAEA;;qBAGA;;;;;;;;;;;;YA4CD,kBAAkB;;qBAGjB;;;YAiBD,uBAAuB;;qBAGtB;WACP;WACA;WACA;WACC;WACK;WACC;WACL;WACG;WACK;WACH;WACF;WACM;WACI;WACX;WACS;WACJ;WACE;WACC;WACF;WACF;;;;;;;qBAQD;;;;;;qBAwBA,iBAAe;YAEhB;;;;;;;;;qBAUC,qDAAc,uCAAA,mCAAA,mCAAA,oCAAA,iCAAA,qCAAA,mCAAA,iCAAA,iCAAA,oCAAA,kCAAA,kCAAA,wCAAA,2CAAA,uCAAA,4CAAA,uCAAA,wCAAA,wCAAA,uCAAA,uCAAA,qCAAA,kCAAA,yCAAA,uCAAA,uCAAA,0CAAA,yCAAA,uCAAA;;;;;;;;;;;;;qBA6Cd,iCAAqB,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA,QAAA;;qBAgCrB,aAAW;;;;;;;;;;;qBAWX;;;;qBA2CA;;qBAEA;;qBAEA,cAAY;;qBAGZ;YACD,sBAAsB;;;;;;;;qBASrB;YACD,4BAA4B;;;;;;;;;;;;qBAa3B;;WAED;;WAEA;;WAEA;;WAED;;;qBAIE"}
@@ -1,11 +1,11 @@
1
1
  import { SetCookie } from "cookie";
2
2
  //#region src/click-id/index.d.ts
3
- declare const FBC_COOKIE = "_fbc";
4
- declare const RDT_CID_COOKIE = "_rdt_cid";
5
- declare const GCL_AW_COOKIE = "_gcl_aw";
6
- declare const GCL_GB_COOKIE = "_gcl_gb";
7
- declare const UET_MSCLKID_COOKIE = "_uetmsclkid";
8
- type ParsedFbc = {
3
+ export declare const FBC_COOKIE = "_fbc";
4
+ export declare const RDT_CID_COOKIE = "_rdt_cid";
5
+ export declare const GCL_AW_COOKIE = "_gcl_aw";
6
+ export declare const GCL_GB_COOKIE = "_gcl_gb";
7
+ export declare const UET_MSCLKID_COOKIE = "_uetmsclkid";
8
+ export type ParsedFbc = {
9
9
  raw: string;
10
10
  creationTime: number;
11
11
  fbclid: string;
@@ -15,13 +15,13 @@ type ParsedFbc = {
15
15
  * Returns undefined for anything malformed — a fbclid never contains a dot, but joining the tail
16
16
  * back together keeps us forward-compatible if that ever changes.
17
17
  */
18
- declare function parseFbc(raw: string | undefined | null, now?: number): ParsedFbc | undefined;
18
+ export declare function parseFbc(raw: string | undefined | null, now?: number): ParsedFbc | undefined;
19
19
  /**
20
20
  * Build a fresh `_fbc` value. subdomainIndex is the cookie's domain level (com=0, example.com=1,
21
21
  * www.example.com=2); 1 is correct for an apex-hosted cookie.
22
22
  */
23
- declare function formatFbc(fbclid: string, now: number, subdomainIndex?: number): string;
24
- type ParsedGcl = {
23
+ export declare function formatFbc(fbclid: string, now: number, subdomainIndex?: number): string;
24
+ export type ParsedGcl = {
25
25
  raw: string;
26
26
  creationTime: number;
27
27
  clickId: string;
@@ -32,22 +32,22 @@ type ParsedGcl = {
32
32
  * validates the segments exactly this way (`/^\d+$/` timestamp, `/^[\w-]+$/` click id); any
33
33
  * labels tail is preserved through `raw` so a re-issue stays byte-identical.
34
34
  */
35
- declare function parseGcl(raw: string | undefined | null, now?: number): ParsedGcl | undefined;
35
+ export declare function parseGcl(raw: string | undefined | null, now?: number): ParsedGcl | undefined;
36
36
  /** Build a fresh `_gcl_aw`/`_gcl_gb` value in gtag's own format. */
37
- declare function formatGcl(clickId: string, now: number): string;
37
+ export declare function formatGcl(clickId: string, now: number): string;
38
38
  /**
39
39
  * Parse a `_uetmsclkid` value: `_uet<32 hex>`. Returns the click id, lowercased, or undefined
40
40
  * for anything bat.js itself would not read back.
41
41
  */
42
- declare function parseUetMsclkid(raw: string | undefined | null): string | undefined;
42
+ export declare function parseUetMsclkid(raw: string | undefined | null): string | undefined;
43
43
  /** Build a `_uetmsclkid` value in bat.js's own format. */
44
- declare function formatUetMsclkid(clickId: string): string;
44
+ export declare function formatUetMsclkid(clickId: string): string;
45
45
  /**
46
46
  * The click id as the Conversions API wants it: a dashed, lowercase UUID. The URL and the cookie
47
47
  * carry the 32-hex form; a value in any other shape is returned untouched for the API to judge.
48
48
  */
49
- declare function formatMsclkid(clickId: string): string;
50
- type ResolveClickIdCookiesInput = {
49
+ export declare function formatMsclkid(clickId: string): string;
50
+ export type ResolveClickIdCookiesInput = {
51
51
  /** The absolute request URL (must include the query string). */
52
52
  url: string;
53
53
  /** The raw `Cookie` request header, if any. */
@@ -76,7 +76,7 @@ type ResolveClickIdCookiesInput = {
76
76
  */
77
77
  refresh?: boolean;
78
78
  };
79
- type ResolveClickIdCookiesResult = {
79
+ export type ResolveClickIdCookiesResult = {
80
80
  /**
81
81
  * Cookies to emit on the response, ready for `Set-Cookie`. Empty when nothing needs to change.
82
82
  * A `value: ''`, `maxAge: 0` entry is a deletion (an expired or malformed leftover).
@@ -103,9 +103,8 @@ type ResolveClickIdCookiesResult = {
103
103
  * *remaining* lifetime — never `now + 90d` — so a returning visitor's window cannot slide forward
104
104
  * (which is what makes Meta flag an expired fbclid).
105
105
  */
106
- declare function resolveClickIdCookies(input: ResolveClickIdCookiesInput): ResolveClickIdCookiesResult;
106
+ export declare function resolveClickIdCookies(input: ResolveClickIdCookiesInput): ResolveClickIdCookiesResult;
107
107
  /** Serialize the resolved cookies into `Set-Cookie` header values. */
108
- declare function toSetCookieHeaders(cookies: SetCookie[]): string[];
108
+ export declare function toSetCookieHeaders(cookies: SetCookie[]): string[];
109
109
  //#endregion
110
- export { FBC_COOKIE, GCL_AW_COOKIE, GCL_GB_COOKIE, ParsedFbc, ParsedGcl, RDT_CID_COOKIE, ResolveClickIdCookiesInput, ResolveClickIdCookiesResult, UET_MSCLKID_COOKIE, formatFbc, formatGcl, formatMsclkid, formatUetMsclkid, parseFbc, parseGcl, parseUetMsclkid, resolveClickIdCookies, toSetCookieHeaders };
111
110
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/click-id/index.ts"],"mappings":";;cA2Ca;cACA;cACA;cACA;cACA;KAED;EAAc;EAAa;EAAsB;;;;;;;iBAO7C,SACd,gCACA,eACC;;;;;iBAmBa,UAAU,gBAAgB,aAAa;KAI3C;EAAc;EAAa;EAAsB;;;;;;;;iBAa7C,SACd,gCACA,eACC;;iBAgBa,UAAU,iBAAiB;;;;;iBAe3B,gBAAgB;;iBAOhB,iBAAiB;;;;;iBAQjB,cAAc;KAMlB;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;EAeA;;KAGU;;;;;EAKV,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;iBAuBc,sBACd,OAAO,6BACN;;iBAoHa,mBAAmB,SAAS"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/click-id/index.ts"],"mappings":";;qBA2Ca;qBACA;qBACA;qBACA;qBACA;YAED;EAAc;EAAa;EAAsB;;;;;;;wBAO7C,SACd,gCACA,eACC;;;;;wBAmBa,UAAU,gBAAgB,aAAa;YAI3C;EAAc;EAAa;EAAsB;;;;;;;;wBAa7C,SACd,gCACA,eACC;;wBAgBa,UAAU,iBAAiB;;;;;wBAe3B,gBAAgB;;wBAOhB,iBAAiB;;;;;wBAQjB,cAAc;YAMlB;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;EAeA;;YAGU;;;;;EAKV,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;wBAuBc,sBACd,OAAO,6BACN;;wBAoHa,mBAAmB,SAAS"}
@@ -1,11 +1,11 @@
1
1
  import { SetCookie } from "cookie";
2
2
  //#region src/click-id/index.d.ts
3
- declare const FBC_COOKIE = "_fbc";
4
- declare const RDT_CID_COOKIE = "_rdt_cid";
5
- declare const GCL_AW_COOKIE = "_gcl_aw";
6
- declare const GCL_GB_COOKIE = "_gcl_gb";
7
- declare const UET_MSCLKID_COOKIE = "_uetmsclkid";
8
- type ParsedFbc = {
3
+ export declare const FBC_COOKIE = "_fbc";
4
+ export declare const RDT_CID_COOKIE = "_rdt_cid";
5
+ export declare const GCL_AW_COOKIE = "_gcl_aw";
6
+ export declare const GCL_GB_COOKIE = "_gcl_gb";
7
+ export declare const UET_MSCLKID_COOKIE = "_uetmsclkid";
8
+ export type ParsedFbc = {
9
9
  raw: string;
10
10
  creationTime: number;
11
11
  fbclid: string;
@@ -15,13 +15,13 @@ type ParsedFbc = {
15
15
  * Returns undefined for anything malformed — a fbclid never contains a dot, but joining the tail
16
16
  * back together keeps us forward-compatible if that ever changes.
17
17
  */
18
- declare function parseFbc(raw: string | undefined | null, now?: number): ParsedFbc | undefined;
18
+ export declare function parseFbc(raw: string | undefined | null, now?: number): ParsedFbc | undefined;
19
19
  /**
20
20
  * Build a fresh `_fbc` value. subdomainIndex is the cookie's domain level (com=0, example.com=1,
21
21
  * www.example.com=2); 1 is correct for an apex-hosted cookie.
22
22
  */
23
- declare function formatFbc(fbclid: string, now: number, subdomainIndex?: number): string;
24
- type ParsedGcl = {
23
+ export declare function formatFbc(fbclid: string, now: number, subdomainIndex?: number): string;
24
+ export type ParsedGcl = {
25
25
  raw: string;
26
26
  creationTime: number;
27
27
  clickId: string;
@@ -32,22 +32,22 @@ type ParsedGcl = {
32
32
  * validates the segments exactly this way (`/^\d+$/` timestamp, `/^[\w-]+$/` click id); any
33
33
  * labels tail is preserved through `raw` so a re-issue stays byte-identical.
34
34
  */
35
- declare function parseGcl(raw: string | undefined | null, now?: number): ParsedGcl | undefined;
35
+ export declare function parseGcl(raw: string | undefined | null, now?: number): ParsedGcl | undefined;
36
36
  /** Build a fresh `_gcl_aw`/`_gcl_gb` value in gtag's own format. */
37
- declare function formatGcl(clickId: string, now: number): string;
37
+ export declare function formatGcl(clickId: string, now: number): string;
38
38
  /**
39
39
  * Parse a `_uetmsclkid` value: `_uet<32 hex>`. Returns the click id, lowercased, or undefined
40
40
  * for anything bat.js itself would not read back.
41
41
  */
42
- declare function parseUetMsclkid(raw: string | undefined | null): string | undefined;
42
+ export declare function parseUetMsclkid(raw: string | undefined | null): string | undefined;
43
43
  /** Build a `_uetmsclkid` value in bat.js's own format. */
44
- declare function formatUetMsclkid(clickId: string): string;
44
+ export declare function formatUetMsclkid(clickId: string): string;
45
45
  /**
46
46
  * The click id as the Conversions API wants it: a dashed, lowercase UUID. The URL and the cookie
47
47
  * carry the 32-hex form; a value in any other shape is returned untouched for the API to judge.
48
48
  */
49
- declare function formatMsclkid(clickId: string): string;
50
- type ResolveClickIdCookiesInput = {
49
+ export declare function formatMsclkid(clickId: string): string;
50
+ export type ResolveClickIdCookiesInput = {
51
51
  /** The absolute request URL (must include the query string). */
52
52
  url: string;
53
53
  /** The raw `Cookie` request header, if any. */
@@ -76,7 +76,7 @@ type ResolveClickIdCookiesInput = {
76
76
  */
77
77
  refresh?: boolean;
78
78
  };
79
- type ResolveClickIdCookiesResult = {
79
+ export type ResolveClickIdCookiesResult = {
80
80
  /**
81
81
  * Cookies to emit on the response, ready for `Set-Cookie`. Empty when nothing needs to change.
82
82
  * A `value: ''`, `maxAge: 0` entry is a deletion (an expired or malformed leftover).
@@ -103,9 +103,8 @@ type ResolveClickIdCookiesResult = {
103
103
  * *remaining* lifetime — never `now + 90d` — so a returning visitor's window cannot slide forward
104
104
  * (which is what makes Meta flag an expired fbclid).
105
105
  */
106
- declare function resolveClickIdCookies(input: ResolveClickIdCookiesInput): ResolveClickIdCookiesResult;
106
+ export declare function resolveClickIdCookies(input: ResolveClickIdCookiesInput): ResolveClickIdCookiesResult;
107
107
  /** Serialize the resolved cookies into `Set-Cookie` header values. */
108
- declare function toSetCookieHeaders(cookies: SetCookie[]): string[];
108
+ export declare function toSetCookieHeaders(cookies: SetCookie[]): string[];
109
109
  //#endregion
110
- export { FBC_COOKIE, GCL_AW_COOKIE, GCL_GB_COOKIE, ParsedFbc, ParsedGcl, RDT_CID_COOKIE, ResolveClickIdCookiesInput, ResolveClickIdCookiesResult, UET_MSCLKID_COOKIE, formatFbc, formatGcl, formatMsclkid, formatUetMsclkid, parseFbc, parseGcl, parseUetMsclkid, resolveClickIdCookies, toSetCookieHeaders };
111
110
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/click-id/index.ts"],"mappings":";;cA2Ca;cACA;cACA;cACA;cACA;KAED;EAAc;EAAa;EAAsB;;;;;;;iBAO7C,SACd,gCACA,eACC;;;;;iBAmBa,UAAU,gBAAgB,aAAa;KAI3C;EAAc;EAAa;EAAsB;;;;;;;;iBAa7C,SACd,gCACA,eACC;;iBAgBa,UAAU,iBAAiB;;;;;iBAe3B,gBAAgB;;iBAOhB,iBAAiB;;;;;iBAQjB,cAAc;KAMlB;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;EAeA;;KAGU;;;;;EAKV,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;iBAuBc,sBACd,OAAO,6BACN;;iBAoHa,mBAAmB,SAAS"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/click-id/index.ts"],"mappings":";;qBA2Ca;qBACA;qBACA;qBACA;qBACA;YAED;EAAc;EAAa;EAAsB;;;;;;;wBAO7C,SACd,gCACA,eACC;;;;;wBAmBa,UAAU,gBAAgB,aAAa;YAI3C;EAAc;EAAa;EAAsB;;;;;;;;wBAa7C,SACd,gCACA,eACC;;wBAgBa,UAAU,iBAAiB;;;;;wBAe3B,gBAAgB;;wBAOhB,iBAAiB;;;;;wBAQjB,cAAc;YAMlB;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;EAeA;;YAGU;;;;;EAKV,SAAS;;EAET;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;wBAuBc,sBACd,OAAO,6BACN;;wBAoHa,mBAAmB,SAAS"}
@@ -1,5 +1,5 @@
1
1
  //#region src/constants/storage.d.ts
2
- declare const keys: {
2
+ export declare const keys: {
3
3
  readonly device_id: 'device_id';
4
4
  readonly visitor_id: 'visitor_id';
5
5
  readonly first_open_time: 'first_open_time';
@@ -9,5 +9,4 @@ declare const keys: {
9
9
  readonly session: 'session';
10
10
  };
11
11
  //#endregion
12
- export { keys };
13
12
  //# sourceMappingURL=storage.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.cts","names":[],"sources":["../../src/constants/storage.ts"],"mappings":";cAAa;WACX;WACA;WACA;WACA;;WAEA;WACA"}
1
+ {"version":3,"file":"storage.d.cts","names":[],"sources":["../../src/constants/storage.ts"],"mappings":";qBAAa;WACX;WACA;WACA;WACA;;WAEA;WACA"}