@shware/analytics 3.6.4 → 3.8.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 (407) hide show
  1. package/README.md +50 -3
  2. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  3. package/dist/constants/storage.cjs +12 -37
  4. package/dist/constants/storage.cjs.map +1 -1
  5. package/dist/constants/storage.d.cts +10 -8
  6. package/dist/constants/storage.d.cts.map +1 -0
  7. package/dist/constants/storage.d.mts +13 -0
  8. package/dist/constants/storage.d.mts.map +1 -0
  9. package/dist/constants/storage.mjs +12 -13
  10. package/dist/constants/storage.mjs.map +1 -1
  11. package/dist/feedback/index.cjs +14 -40
  12. package/dist/feedback/index.cjs.map +1 -1
  13. package/dist/feedback/index.d.cts +4 -4
  14. package/dist/feedback/index.d.cts.map +1 -0
  15. package/dist/feedback/index.d.mts +6 -0
  16. package/dist/feedback/index.d.mts.map +1 -0
  17. package/dist/feedback/index.mjs +12 -14
  18. package/dist/feedback/index.mjs.map +1 -1
  19. package/dist/hooks/use-app-analytics.cjs +46 -65
  20. package/dist/hooks/use-app-analytics.cjs.map +1 -1
  21. package/dist/hooks/use-app-analytics.d.cts +3 -1
  22. package/dist/hooks/use-app-analytics.d.cts.map +1 -0
  23. package/dist/hooks/use-app-analytics.d.mts +5 -0
  24. package/dist/hooks/use-app-analytics.d.mts.map +1 -0
  25. package/dist/hooks/use-app-analytics.mjs +41 -36
  26. package/dist/hooks/use-app-analytics.mjs.map +1 -1
  27. package/dist/hooks/use-click-id-persistence.cjs +43 -65
  28. package/dist/hooks/use-click-id-persistence.cjs.map +1 -1
  29. package/dist/hooks/use-click-id-persistence.d.cts +3 -1
  30. package/dist/hooks/use-click-id-persistence.d.cts.map +1 -0
  31. package/dist/hooks/use-click-id-persistence.d.mts +5 -0
  32. package/dist/hooks/use-click-id-persistence.d.mts.map +1 -0
  33. package/dist/hooks/use-click-id-persistence.mjs +40 -38
  34. package/dist/hooks/use-click-id-persistence.mjs.map +1 -1
  35. package/dist/hooks/use-outbound-click-analytics.cjs +33 -55
  36. package/dist/hooks/use-outbound-click-analytics.cjs.map +1 -1
  37. package/dist/hooks/use-outbound-click-analytics.d.cts +3 -1
  38. package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -0
  39. package/dist/hooks/{use-outbound-click-analytics.d.ts → use-outbound-click-analytics.d.mts} +3 -1
  40. package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -0
  41. package/dist/hooks/use-outbound-click-analytics.mjs +31 -29
  42. package/dist/hooks/use-outbound-click-analytics.mjs.map +1 -1
  43. package/dist/hooks/use-previous.cjs +11 -35
  44. package/dist/hooks/use-previous.cjs.map +1 -1
  45. package/dist/hooks/use-previous.d.cts +3 -1
  46. package/dist/hooks/use-previous.d.cts.map +1 -0
  47. package/dist/hooks/use-previous.d.mts +5 -0
  48. package/dist/hooks/use-previous.d.mts.map +1 -0
  49. package/dist/hooks/use-previous.mjs +9 -9
  50. package/dist/hooks/use-previous.mjs.map +1 -1
  51. package/dist/hooks/use-track-impression.cjs +24 -51
  52. package/dist/hooks/use-track-impression.cjs.map +1 -1
  53. package/dist/hooks/use-track-impression.d.cts +5 -6
  54. package/dist/hooks/use-track-impression.d.cts.map +1 -0
  55. package/dist/hooks/use-track-impression.d.mts +6 -0
  56. package/dist/hooks/use-track-impression.d.mts.map +1 -0
  57. package/dist/hooks/use-track-impression.mjs +22 -25
  58. package/dist/hooks/use-track-impression.mjs.map +1 -1
  59. package/dist/hooks/use-web-analytics.cjs +98 -109
  60. package/dist/hooks/use-web-analytics.cjs.map +1 -1
  61. package/dist/hooks/use-web-analytics.d.cts +3 -1
  62. package/dist/hooks/use-web-analytics.d.cts.map +1 -0
  63. package/dist/hooks/{use-web-analytics.d.ts → use-web-analytics.d.mts} +3 -1
  64. package/dist/hooks/use-web-analytics.d.mts.map +1 -0
  65. package/dist/hooks/use-web-analytics.mjs +93 -80
  66. package/dist/hooks/use-web-analytics.mjs.map +1 -1
  67. package/dist/index.cjs +28 -74
  68. package/dist/index.d.cts +11 -13
  69. package/dist/index.d.mts +11 -0
  70. package/dist/index.mjs +3 -34
  71. package/dist/link/index.cjs +31 -58
  72. package/dist/link/index.cjs.map +1 -1
  73. package/dist/link/index.d.cts +7 -7
  74. package/dist/link/index.d.cts.map +1 -0
  75. package/dist/link/index.d.mts +11 -0
  76. package/dist/link/index.d.mts.map +1 -0
  77. package/dist/link/index.mjs +28 -31
  78. package/dist/link/index.mjs.map +1 -1
  79. package/dist/native/fbsdk.cjs +12 -33
  80. package/dist/native/fbsdk.cjs.map +1 -1
  81. package/dist/native/fbsdk.d.cts +4 -4
  82. package/dist/native/fbsdk.d.cts.map +1 -0
  83. package/dist/native/{fbsdk.d.ts → fbsdk.d.mts} +4 -4
  84. package/dist/native/fbsdk.d.mts.map +1 -0
  85. package/dist/native/fbsdk.mjs +10 -7
  86. package/dist/native/fbsdk.mjs.map +1 -1
  87. package/dist/native/fingerprint.cjs +41 -64
  88. package/dist/native/fingerprint.cjs.map +1 -1
  89. package/dist/native/fingerprint.d.cts +22 -20
  90. package/dist/native/fingerprint.d.cts.map +1 -0
  91. package/dist/native/fingerprint.d.mts +28 -0
  92. package/dist/native/fingerprint.d.mts.map +1 -0
  93. package/dist/native/fingerprint.mjs +36 -42
  94. package/dist/native/fingerprint.mjs.map +1 -1
  95. package/dist/native/firebase.cjs +12 -39
  96. package/dist/native/firebase.cjs.map +1 -1
  97. package/dist/native/firebase.d.cts +4 -4
  98. package/dist/native/firebase.d.cts.map +1 -0
  99. package/dist/native/firebase.d.mts +6 -0
  100. package/dist/native/firebase.d.mts.map +1 -0
  101. package/dist/native/firebase.mjs +10 -13
  102. package/dist/native/firebase.mjs.map +1 -1
  103. package/dist/native/index.cjs +11 -45
  104. package/dist/native/index.d.cts +4 -7
  105. package/dist/native/index.d.mts +4 -0
  106. package/dist/native/index.mjs +2 -12
  107. package/dist/native/posthog.cjs +5 -30
  108. package/dist/native/posthog.cjs.map +1 -1
  109. package/dist/native/posthog.d.cts +3 -1
  110. package/dist/native/posthog.d.cts.map +1 -0
  111. package/dist/native/posthog.d.mts +5 -0
  112. package/dist/native/posthog.d.mts.map +1 -0
  113. package/dist/native/posthog.mjs +5 -6
  114. package/dist/native/posthog.mjs.map +1 -1
  115. package/dist/native/setup.cjs +91 -129
  116. package/dist/native/setup.cjs.map +1 -1
  117. package/dist/native/setup.d.cts +6 -6
  118. package/dist/native/setup.d.cts.map +1 -0
  119. package/dist/native/{setup.d.ts → setup.d.mts} +6 -6
  120. package/dist/native/setup.d.mts.map +1 -0
  121. package/dist/native/setup.mjs +83 -105
  122. package/dist/native/setup.mjs.map +1 -1
  123. package/dist/next/index.cjs +72 -145
  124. package/dist/next/index.cjs.map +1 -1
  125. package/dist/next/index.d.cts +18 -19
  126. package/dist/next/index.d.cts.map +1 -0
  127. package/dist/next/index.d.mts +21 -0
  128. package/dist/next/index.d.mts.map +1 -0
  129. package/dist/next/index.mjs +65 -107
  130. package/dist/next/index.mjs.map +1 -1
  131. package/dist/react-router/index.cjs +80 -144
  132. package/dist/react-router/index.cjs.map +1 -1
  133. package/dist/react-router/index.d.cts +18 -19
  134. package/dist/react-router/index.d.cts.map +1 -0
  135. package/dist/react-router/index.d.mts +21 -0
  136. package/dist/react-router/index.d.mts.map +1 -0
  137. package/dist/react-router/index.mjs +75 -115
  138. package/dist/react-router/index.mjs.map +1 -1
  139. package/dist/schema/index.cjs +189 -233
  140. package/dist/schema/index.cjs.map +1 -1
  141. package/dist/schema/index.d.cts +308 -231
  142. package/dist/schema/index.d.cts.map +1 -0
  143. package/dist/schema/index.d.mts +401 -0
  144. package/dist/schema/index.d.mts.map +1 -0
  145. package/dist/schema/index.mjs +179 -222
  146. package/dist/schema/index.mjs.map +1 -1
  147. package/dist/server/index.cjs +9 -40
  148. package/dist/server/index.d.cts +5 -9
  149. package/dist/server/index.d.mts +5 -0
  150. package/dist/server/index.mjs +5 -12
  151. package/dist/server/linkedin-conversions-api.cjs +66 -95
  152. package/dist/server/linkedin-conversions-api.cjs.map +1 -1
  153. package/dist/server/linkedin-conversions-api.d.cts +45 -45
  154. package/dist/server/linkedin-conversions-api.d.cts.map +1 -0
  155. package/dist/server/linkedin-conversions-api.d.mts +56 -0
  156. package/dist/server/linkedin-conversions-api.d.mts.map +1 -0
  157. package/dist/server/linkedin-conversions-api.mjs +63 -68
  158. package/dist/server/linkedin-conversions-api.mjs.map +1 -1
  159. package/dist/server/meta-conversions-api.cjs +157 -265
  160. package/dist/server/meta-conversions-api.cjs.map +1 -1
  161. package/dist/server/meta-conversions-api.d.cts +8 -9
  162. package/dist/server/meta-conversions-api.d.cts.map +1 -0
  163. package/dist/server/meta-conversions-api.d.mts +10 -0
  164. package/dist/server/meta-conversions-api.d.mts.map +1 -0
  165. package/dist/server/meta-conversions-api.mjs +151 -243
  166. package/dist/server/meta-conversions-api.mjs.map +1 -1
  167. package/dist/server/openai-conversions-api.cjs +69 -96
  168. package/dist/server/openai-conversions-api.cjs.map +1 -1
  169. package/dist/server/openai-conversions-api.d.cts +34 -34
  170. package/dist/server/openai-conversions-api.d.cts.map +1 -0
  171. package/dist/server/openai-conversions-api.d.mts +47 -0
  172. package/dist/server/openai-conversions-api.d.mts.map +1 -0
  173. package/dist/server/openai-conversions-api.mjs +65 -68
  174. package/dist/server/openai-conversions-api.mjs.map +1 -1
  175. package/dist/server/reddit-conversions-api.cjs +64 -91
  176. package/dist/server/reddit-conversions-api.cjs.map +1 -1
  177. package/dist/server/reddit-conversions-api.d.cts +61 -61
  178. package/dist/server/reddit-conversions-api.d.cts.map +1 -0
  179. package/dist/server/reddit-conversions-api.d.mts +75 -0
  180. package/dist/server/reddit-conversions-api.d.mts.map +1 -0
  181. package/dist/server/reddit-conversions-api.mjs +59 -62
  182. package/dist/server/reddit-conversions-api.mjs.map +1 -1
  183. package/dist/setup/index.cjs +34 -63
  184. package/dist/setup/index.cjs.map +1 -1
  185. package/dist/setup/index.d.cts +30 -30
  186. package/dist/setup/index.d.cts.map +1 -0
  187. package/dist/setup/index.d.mts +41 -0
  188. package/dist/setup/index.d.mts.map +1 -0
  189. package/dist/setup/index.mjs +31 -36
  190. package/dist/setup/index.mjs.map +1 -1
  191. package/dist/setup/session.cjs +70 -106
  192. package/dist/setup/session.cjs.map +1 -1
  193. package/dist/setup/session.d.cts +26 -24
  194. package/dist/setup/session.d.cts.map +1 -0
  195. package/dist/setup/session.d.mts +31 -0
  196. package/dist/setup/session.d.mts.map +1 -0
  197. package/dist/setup/session.mjs +68 -80
  198. package/dist/setup/session.mjs.map +1 -1
  199. package/dist/tanstack/index.cjs +86 -156
  200. package/dist/tanstack/index.cjs.map +1 -1
  201. package/dist/tanstack/index.d.cts +19 -20
  202. package/dist/tanstack/index.d.cts.map +1 -0
  203. package/dist/tanstack/index.d.mts +22 -0
  204. package/dist/tanstack/index.d.mts.map +1 -0
  205. package/dist/tanstack/index.mjs +81 -127
  206. package/dist/tanstack/index.mjs.map +1 -1
  207. package/dist/third-parties/google-analytics.cjs +18 -43
  208. package/dist/third-parties/google-analytics.cjs.map +1 -1
  209. package/dist/third-parties/google-analytics.d.cts +7 -7
  210. package/dist/third-parties/google-analytics.d.cts.map +1 -0
  211. package/dist/third-parties/google-analytics.d.mts +12 -0
  212. package/dist/third-parties/google-analytics.d.mts.map +1 -0
  213. package/dist/third-parties/google-analytics.mjs +16 -17
  214. package/dist/third-parties/google-analytics.mjs.map +1 -1
  215. package/dist/third-parties/ignored-events.cjs +35 -68
  216. package/dist/third-parties/ignored-events.cjs.map +1 -1
  217. package/dist/third-parties/ignored-events.d.cts +3 -1
  218. package/dist/third-parties/ignored-events.d.cts.map +1 -0
  219. package/dist/third-parties/ignored-events.d.mts +5 -0
  220. package/dist/third-parties/ignored-events.d.mts.map +1 -0
  221. package/dist/third-parties/ignored-events.mjs +34 -43
  222. package/dist/third-parties/ignored-events.mjs.map +1 -1
  223. package/dist/third-parties/index.cjs +16 -53
  224. package/dist/third-parties/index.d.cts +6 -12
  225. package/dist/third-parties/index.d.mts +6 -0
  226. package/dist/third-parties/index.mjs +1 -14
  227. package/dist/third-parties/linkedin-insight-tag.cjs +28 -50
  228. package/dist/third-parties/linkedin-insight-tag.cjs.map +1 -1
  229. package/dist/third-parties/linkedin-insight-tag.d.cts +8 -9
  230. package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -0
  231. package/dist/third-parties/{linkedin-insight-tag.d.ts → linkedin-insight-tag.d.mts} +8 -9
  232. package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -0
  233. package/dist/third-parties/linkedin-insight-tag.mjs +25 -23
  234. package/dist/third-parties/linkedin-insight-tag.mjs.map +1 -1
  235. package/dist/third-parties/meta-pixel.cjs +45 -66
  236. package/dist/third-parties/meta-pixel.cjs.map +1 -1
  237. package/dist/third-parties/meta-pixel.d.cts +7 -8
  238. package/dist/third-parties/meta-pixel.d.cts.map +1 -0
  239. package/dist/third-parties/meta-pixel.d.mts +12 -0
  240. package/dist/third-parties/meta-pixel.d.mts.map +1 -0
  241. package/dist/third-parties/meta-pixel.mjs +41 -38
  242. package/dist/third-parties/meta-pixel.mjs.map +1 -1
  243. package/dist/third-parties/openai-pixel.cjs +63 -68
  244. package/dist/third-parties/openai-pixel.cjs.map +1 -1
  245. package/dist/third-parties/openai-pixel.d.cts +7 -8
  246. package/dist/third-parties/openai-pixel.d.cts.map +1 -0
  247. package/dist/third-parties/{openai-pixel.d.ts → openai-pixel.d.mts} +7 -8
  248. package/dist/third-parties/openai-pixel.d.mts.map +1 -0
  249. package/dist/third-parties/openai-pixel.mjs +60 -41
  250. package/dist/third-parties/openai-pixel.mjs.map +1 -1
  251. package/dist/third-parties/posthog.cjs +23 -43
  252. package/dist/third-parties/posthog.cjs.map +1 -1
  253. package/dist/third-parties/posthog.d.cts +5 -5
  254. package/dist/third-parties/posthog.d.cts.map +1 -0
  255. package/dist/third-parties/{posthog.d.ts → posthog.d.mts} +5 -5
  256. package/dist/third-parties/posthog.d.mts.map +1 -0
  257. package/dist/third-parties/posthog.mjs +20 -16
  258. package/dist/third-parties/posthog.mjs.map +1 -1
  259. package/dist/third-parties/reddit-pixel.cjs +37 -58
  260. package/dist/third-parties/reddit-pixel.cjs.map +1 -1
  261. package/dist/third-parties/reddit-pixel.d.cts +7 -8
  262. package/dist/third-parties/reddit-pixel.d.cts.map +1 -0
  263. package/dist/third-parties/reddit-pixel.d.mts +12 -0
  264. package/dist/third-parties/reddit-pixel.d.mts.map +1 -0
  265. package/dist/third-parties/reddit-pixel.mjs +33 -30
  266. package/dist/third-parties/reddit-pixel.mjs.map +1 -1
  267. package/dist/track/fbq.cjs +179 -135
  268. package/dist/track/fbq.cjs.map +1 -1
  269. package/dist/track/fbq.d.cts +234 -233
  270. package/dist/track/fbq.d.cts.map +1 -0
  271. package/dist/track/fbq.d.mts +280 -0
  272. package/dist/track/fbq.d.mts.map +1 -0
  273. package/dist/track/fbq.mjs +176 -108
  274. package/dist/track/fbq.mjs.map +1 -1
  275. package/dist/track/gtag.cjs +63 -86
  276. package/dist/track/gtag.cjs.map +1 -1
  277. package/dist/track/gtag.d.cts +682 -682
  278. package/dist/track/gtag.d.cts.map +1 -0
  279. package/dist/track/gtag.d.mts +762 -0
  280. package/dist/track/gtag.d.mts.map +1 -0
  281. package/dist/track/gtag.mjs +62 -61
  282. package/dist/track/gtag.mjs.map +1 -1
  283. package/dist/track/index.cjs +111 -136
  284. package/dist/track/index.cjs.map +1 -1
  285. package/dist/track/index.d.cts +8 -8
  286. package/dist/track/index.d.cts.map +1 -0
  287. package/dist/track/{index.d.ts → index.d.mts} +8 -8
  288. package/dist/track/index.d.mts.map +1 -0
  289. package/dist/track/index.mjs +105 -106
  290. package/dist/track/index.mjs.map +1 -1
  291. package/dist/track/lintrk.cjs +0 -19
  292. package/dist/track/lintrk.d.cts +12 -10
  293. package/dist/track/lintrk.d.cts.map +1 -0
  294. package/dist/track/lintrk.d.mts +14 -0
  295. package/dist/track/lintrk.d.mts.map +1 -0
  296. package/dist/track/lintrk.mjs +1 -1
  297. package/dist/track/oaiq.cjs +153 -146
  298. package/dist/track/oaiq.cjs.map +1 -1
  299. package/dist/track/oaiq.d.cts +65 -64
  300. package/dist/track/oaiq.d.cts.map +1 -0
  301. package/dist/track/oaiq.d.mts +112 -0
  302. package/dist/track/oaiq.d.mts.map +1 -0
  303. package/dist/track/oaiq.mjs +149 -118
  304. package/dist/track/oaiq.mjs.map +1 -1
  305. package/dist/track/rdt.cjs +66 -110
  306. package/dist/track/rdt.cjs.map +1 -1
  307. package/dist/track/rdt.d.cts +74 -73
  308. package/dist/track/rdt.d.cts.map +1 -0
  309. package/dist/track/rdt.d.mts +97 -0
  310. package/dist/track/rdt.d.mts.map +1 -0
  311. package/dist/track/rdt.mjs +63 -83
  312. package/dist/track/rdt.mjs.map +1 -1
  313. package/dist/track/types.cjs +0 -19
  314. package/dist/track/types.d.cts +140 -111
  315. package/dist/track/types.d.cts.map +1 -0
  316. package/dist/track/types.d.mts +171 -0
  317. package/dist/track/types.d.mts.map +1 -0
  318. package/dist/track/types.mjs +1 -1
  319. package/dist/utils/field.cjs +8 -32
  320. package/dist/utils/field.cjs.map +1 -1
  321. package/dist/utils/field.d.cts +3 -1
  322. package/dist/utils/field.d.cts.map +1 -0
  323. package/dist/utils/{field.d.ts → field.d.mts} +3 -1
  324. package/dist/utils/field.d.mts.map +1 -0
  325. package/dist/utils/field.mjs +7 -7
  326. package/dist/utils/field.mjs.map +1 -1
  327. package/dist/utils/stripe.cjs +25 -49
  328. package/dist/utils/stripe.cjs.map +1 -1
  329. package/dist/utils/stripe.d.cts +3 -1
  330. package/dist/utils/stripe.d.cts.map +1 -0
  331. package/dist/utils/{stripe.d.ts → stripe.d.mts} +3 -1
  332. package/dist/utils/stripe.d.mts.map +1 -0
  333. package/dist/utils/stripe.mjs +23 -23
  334. package/dist/utils/stripe.mjs.map +1 -1
  335. package/dist/visitor/index.cjs +60 -86
  336. package/dist/visitor/index.cjs.map +1 -1
  337. package/dist/visitor/index.d.cts +4 -5
  338. package/dist/visitor/index.d.cts.map +1 -0
  339. package/dist/visitor/{index.d.ts → index.d.mts} +4 -5
  340. package/dist/visitor/index.d.mts.map +1 -0
  341. package/dist/visitor/index.mjs +57 -59
  342. package/dist/visitor/index.mjs.map +1 -1
  343. package/dist/visitor/types.cjs +0 -19
  344. package/dist/visitor/types.d.cts +14 -14
  345. package/dist/visitor/types.d.cts.map +1 -0
  346. package/dist/visitor/types.d.mts +20 -0
  347. package/dist/visitor/types.d.mts.map +1 -0
  348. package/dist/visitor/types.mjs +1 -1
  349. package/dist/web/index.cjs +108 -148
  350. package/dist/web/index.cjs.map +1 -1
  351. package/dist/web/index.d.cts +5 -6
  352. package/dist/web/index.d.cts.map +1 -0
  353. package/dist/web/index.d.mts +9 -0
  354. package/dist/web/index.d.mts.map +1 -0
  355. package/dist/web/index.mjs +101 -109
  356. package/dist/web/index.mjs.map +1 -1
  357. package/package.json +102 -49
  358. package/dist/constants/storage.d.ts +0 -11
  359. package/dist/feedback/index.d.ts +0 -6
  360. package/dist/hooks/use-app-analytics.d.ts +0 -3
  361. package/dist/hooks/use-click-id-persistence.d.ts +0 -3
  362. package/dist/hooks/use-previous.d.ts +0 -3
  363. package/dist/hooks/use-track-impression.d.ts +0 -7
  364. package/dist/index.cjs.map +0 -1
  365. package/dist/index.d.ts +0 -13
  366. package/dist/index.mjs.map +0 -1
  367. package/dist/link/index.d.ts +0 -11
  368. package/dist/native/fingerprint.d.ts +0 -26
  369. package/dist/native/firebase.d.ts +0 -6
  370. package/dist/native/index.cjs.map +0 -1
  371. package/dist/native/index.d.ts +0 -7
  372. package/dist/native/index.mjs.map +0 -1
  373. package/dist/native/posthog.d.ts +0 -3
  374. package/dist/next/index.d.ts +0 -22
  375. package/dist/react-router/index.d.ts +0 -22
  376. package/dist/schema/index.d.ts +0 -324
  377. package/dist/server/index.cjs.map +0 -1
  378. package/dist/server/index.d.ts +0 -9
  379. package/dist/server/index.mjs.map +0 -1
  380. package/dist/server/linkedin-conversions-api.d.ts +0 -56
  381. package/dist/server/meta-conversions-api.d.ts +0 -11
  382. package/dist/server/openai-conversions-api.d.ts +0 -47
  383. package/dist/server/reddit-conversions-api.d.ts +0 -75
  384. package/dist/setup/index.d.ts +0 -41
  385. package/dist/setup/session.d.ts +0 -29
  386. package/dist/tanstack/index.d.ts +0 -23
  387. package/dist/third-parties/google-analytics.d.ts +0 -12
  388. package/dist/third-parties/ignored-events.d.ts +0 -3
  389. package/dist/third-parties/index.cjs.map +0 -1
  390. package/dist/third-parties/index.d.ts +0 -12
  391. package/dist/third-parties/index.mjs.map +0 -1
  392. package/dist/third-parties/meta-pixel.d.ts +0 -13
  393. package/dist/third-parties/reddit-pixel.d.ts +0 -13
  394. package/dist/track/fbq.d.ts +0 -279
  395. package/dist/track/gtag.d.ts +0 -762
  396. package/dist/track/lintrk.cjs.map +0 -1
  397. package/dist/track/lintrk.d.ts +0 -12
  398. package/dist/track/lintrk.mjs.map +0 -1
  399. package/dist/track/oaiq.d.ts +0 -111
  400. package/dist/track/rdt.d.ts +0 -96
  401. package/dist/track/types.cjs.map +0 -1
  402. package/dist/track/types.d.ts +0 -142
  403. package/dist/track/types.mjs.map +0 -1
  404. package/dist/visitor/types.cjs.map +0 -1
  405. package/dist/visitor/types.d.ts +0 -20
  406. package/dist/visitor/types.mjs.map +0 -1
  407. package/dist/web/index.d.ts +0 -10
@@ -0,0 +1,762 @@
1
+ //#region src/track/gtag.d.ts
2
+ /** reference: https://support.google.com/analytics/answer/13316687 */
3
+ declare const reservedWebEventNames: readonly ['app_remove', 'app_store_refund', 'app_store_subscription_cancel', 'app_store_subscription_renew', 'click', 'error', 'file_download', 'first_open', 'first_visit', 'form_start', 'form_submit', 'in_app_purchase', 'page_view', 'scroll', 'session_start', 'user_engagement', 'view_complete', 'video_progress', 'video_start', 'view_search_results'];
4
+ declare const reservedAppEventNames: readonly ['ad_activeview', 'ad_click', 'ad_exposure', 'ad_impression', 'ad_query', 'ad_reward', 'adunit_exposure', 'app_clear_data', 'app_exception', 'app_install', 'app_remove', 'app_store_refund', 'app_update', 'app_upgrade', 'dynamic_link_app_open', 'dynamic_link_app_update', 'dynamic_link_first_open', 'error', 'firebase_campaign', 'firebase_in_app_message_action', 'firebase_in_app_message_dismiss', 'firebase_in_app_message_impression', 'first_open', 'first_visit', 'in_app_purchase', 'notification_dismiss', 'notification_foreground', 'notification_open', 'notification_receive', 'notification_send', 'os_update', 'screen_view', 'session_start', 'user_engagement'];
5
+ declare const reservedEventNames: readonly ["app_remove", "app_store_refund", "app_store_subscription_cancel", "app_store_subscription_renew", "click", "error", "file_download", "first_open", "first_visit", "form_start", "form_submit", "in_app_purchase", "page_view", "scroll", "session_start", "user_engagement", "view_complete", "video_progress", "video_start", "view_search_results", "ad_activeview", "ad_click", "ad_exposure", "ad_impression", "ad_query", "ad_reward", "adunit_exposure", "app_clear_data", "app_exception", "app_install", "app_remove", "app_store_refund", "app_update", "app_upgrade", "dynamic_link_app_open", "dynamic_link_app_update", "dynamic_link_first_open", "error", "firebase_campaign", "firebase_in_app_message_action", "firebase_in_app_message_dismiss", "firebase_in_app_message_impression", "first_open", "first_visit", "in_app_purchase", "notification_dismiss", "notification_foreground", "notification_open", "notification_receive", "notification_send", "os_update", "screen_view", "session_start", "user_engagement"];
6
+ type ReservedWebEventNames = (typeof reservedWebEventNames)[number];
7
+ type ReservedAppEventNames = (typeof reservedAppEventNames)[number];
8
+ type ReservedEventNames = ReservedWebEventNames | ReservedAppEventNames;
9
+ type ReservedEventValues = 'cid' | 'currency' | 'customer_id' | 'customerid' | 'dclid' | 'gclid' | 'session_id' | 'sessionid' | 'sfmc_id' | 'sid' | 'srsltid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}` | `gtag.${string}`;
10
+ type ReservedUserPropertiesNames = 'cid' | 'customer_id' | 'customerid' | 'first_open_after_install' | 'first_open_time' | 'first_visit_time' | 'google_allow_ad_personalization_signals' | 'last_advertising_id_reset' | 'last_deep_link_referrer' | 'last_gclid' | 'lifetime_user_engagement' | 'non_personalized_ads' | 'session_id' | 'session_number' | 'sessionid' | 'sfmc_id' | 'sid' | 'uid' | 'user_id' | 'userid' | `_${string}` | `firebase_${string}` | `ga_${string}` | `google_${string}`;
11
+ type UserPropertiesValue = string | boolean | number | null | undefined;
12
+ type UserProperties = {
13
+ [key: string]: UserPropertiesValue;
14
+ } & { [key in ReservedUserPropertiesNames]?: never; };
15
+ /**
16
+ * reference: https://support.google.com/analytics/answer/14078702
17
+ * You must turn on user-provided data collection in Google Analytics.
18
+ *
19
+ * Validate your user-provided data implementation: https://support.google.com/analytics/answer/14171683
20
+ *
21
+ * Usage: gtag('set', 'user_data', { email: 'abc@abc.com' })
22
+ *
23
+ * To standardize the hash results, before hashing one of these values, you must:
24
+ *
25
+ * - Remove leading and trailing whitespaces.
26
+ * - Convert the text to lowercase.
27
+ * - Format phone numbers according to the E164 standard.
28
+ * - Remove all periods (.) that precede the domain name in gmail.com and googlemail.com email addresses.
29
+ * */
30
+ type UserProvidedDataAddress = {
31
+ first_name?: string;
32
+ last_name?: string;
33
+ street?: string;
34
+ city?: string;
35
+ /** User province, state, or region. Example: `Hampshire` */
36
+ region?: string;
37
+ postal_code?: string;
38
+ /**
39
+ * User country code.
40
+ * Example: 'UK'. Use 2-letter country codes, per the ISO 3166-1 alpha-2 standard.
41
+ */
42
+ country?: string;
43
+ };
44
+ /**
45
+ * To standardize the hash results, before hashing one of these values, you must:
46
+ *
47
+ * - Remove leading and trailing whitespaces.
48
+ * - Convert the text to lowercase.
49
+ * - Format phone numbers according to the E164 standard.
50
+ * - Remove all periods (.) that precede the domain name in gmail.com and googlemail.com email addresses.
51
+ */
52
+ type UserProvidedData = {
53
+ email?: string | string[];
54
+ /**
55
+ * User phone number. Must be in E.164 format, which means it must be 11 to 15 digits including a
56
+ * plus sign (+) prefix and country code with no dashes, parentheses, or spaces.
57
+ *
58
+ * Example: ‘+11231234567’
59
+ */
60
+ phone_number?: string | string[];
61
+ address?: UserProvidedDataAddress | UserProvidedDataAddress[];
62
+ };
63
+ type GaId = `G-${Uppercase<string>}`;
64
+ type GtmId = `GTM-${Uppercase<string>}`;
65
+ type CampaignMedium = 'email' | 'organic' | 'cpc' | 'banner' | 'social' | 'referral' | 'affiliate' | 'video' | 'display' | 'sms' | 'push' | 'qr' | 'audio' | (string & {});
66
+ type CampaignSource = 'google' | 'googleads' | 'bing' | 'bingads' | 'metaads' | 'facebook' | 'twitter' | 'linkedin' | 'instagram' | 'tiktok' | 'youtube' | 'newsletter' | `website_${string}` | `affiliate_${string}` | (string & {});
67
+ type Campaign = {
68
+ id?: string;
69
+ name?: string;
70
+ term?: string;
71
+ content?: string;
72
+ medium?: CampaignMedium;
73
+ source?: CampaignSource;
74
+ };
75
+ type Config = {
76
+ allow_google_signals?: boolean;
77
+ allow_ad_personalization_signals?: boolean;
78
+ campaign_content?: string;
79
+ campaign_id?: string;
80
+ campaign_medium?: CampaignMedium;
81
+ campaign_name?: string;
82
+ campaign_source?: CampaignSource;
83
+ campaign_term?: string;
84
+ /**
85
+ * @deprecated
86
+ * Key Point: Use the campaign_ prefixed version of each campaign value instead of this field.
87
+ */
88
+ campaign?: Campaign;
89
+ client_id?: string;
90
+ content_group?: string;
91
+ cookie_domain?: 'none' | 'auto' | (string & {});
92
+ cookie_expires?: number;
93
+ cookie_flags?: string;
94
+ cookie_path?: string;
95
+ cookie_prefix?: string;
96
+ cookie_update?: boolean;
97
+ ignore_referrer?: boolean;
98
+ language?: string;
99
+ page_location?: string;
100
+ page_referrer?: string;
101
+ page_title?: string;
102
+ send_page_view?: boolean;
103
+ screen_resolution?: `${number}x${number}`;
104
+ user_id?: string;
105
+ user_properties?: UserProperties;
106
+ };
107
+ type Item = {
108
+ item_id: string;
109
+ item_name: string;
110
+ affiliation?: 'Google Store' | (string & {});
111
+ coupon?: string;
112
+ discount?: number;
113
+ index?: number;
114
+ item_brand?: string;
115
+ item_category?: string;
116
+ item_category2?: string;
117
+ item_category3?: string;
118
+ item_category4?: string;
119
+ item_category5?: string;
120
+ item_list_id?: string;
121
+ item_list_name?: string;
122
+ item_variant?: string;
123
+ location_id?: string;
124
+ price?: number;
125
+ quantity?: number;
126
+ };
127
+ type PromotionItem = {
128
+ creative_name?: string;
129
+ creative_slot?: string;
130
+ promotion_id?: string;
131
+ promotion_name?: string;
132
+ };
133
+ type SurveyProperties = {
134
+ id?: string;
135
+ feature?: Lowercase<string>;
136
+ trigger?: Lowercase<string>;
137
+ };
138
+ type SurveyQA = {
139
+ q1: string;
140
+ a1: string;
141
+ q2?: string;
142
+ a2?: string;
143
+ q3?: string;
144
+ a3?: string;
145
+ q4?: string;
146
+ a4?: string;
147
+ q5?: string;
148
+ a5?: string;
149
+ q6?: string;
150
+ a6?: string;
151
+ completed?: boolean;
152
+ };
153
+ type NPSScore = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | (number & {});
154
+ type CASTScore = 1 | 2 | 3 | 4 | 5 | (number & {});
155
+ type CESScore = 1 | 2 | 3 | 4 | 5 | (number & {});
156
+ /** ref: https://support.google.com/analytics/answer/9216061 */
157
+ type EnhancedMeasurementEvents = {
158
+ page_view: {
159
+ page_path: string;
160
+ page_title: string;
161
+ page_referrer?: string;
162
+ page_location?: string;
163
+ previous_page_path?: string;
164
+ engagement_time_msec?: number;
165
+ };
166
+ scroll: {
167
+ engagement_time_msec: number;
168
+ };
169
+ click: {
170
+ link_id: string;
171
+ link_url: string;
172
+ link_text: string;
173
+ link_domain: string;
174
+ link_classes: string;
175
+ outbound: boolean;
176
+ };
177
+ view_search_results: {
178
+ search_term: string;
179
+ };
180
+ video_start: {
181
+ video_current_time: number;
182
+ video_duration: number;
183
+ video_percent: number;
184
+ video_provider: 'youtube' | 'vimeo' | 'html5' | (string & {});
185
+ video_title: string;
186
+ video_url: string;
187
+ visible: boolean;
188
+ };
189
+ video_progress: {
190
+ video_current_time: number;
191
+ video_duration: number;
192
+ video_percent: number;
193
+ video_provider: 'youtube' | 'vimeo' | 'html5' | (string & {});
194
+ video_title: string;
195
+ video_url: string;
196
+ visible: boolean;
197
+ };
198
+ video_complete: {
199
+ video_current_time: number;
200
+ video_duration: number;
201
+ video_percent: number;
202
+ video_provider: 'youtube' | 'vimeo' | 'html5' | (string & {});
203
+ video_title: string;
204
+ video_url: string;
205
+ visible: boolean;
206
+ };
207
+ file_download: {
208
+ file_extension: string;
209
+ file_name: string;
210
+ link_classes: string;
211
+ link_id: string;
212
+ link_text: string;
213
+ link_url: string;
214
+ };
215
+ form_start: {
216
+ form_id: string;
217
+ form_name: string;
218
+ form_destination: string;
219
+ };
220
+ form_submit: {
221
+ form_id: string;
222
+ form_name: string;
223
+ form_destination: string;
224
+ form_submit_text: string;
225
+ };
226
+ };
227
+ /** ref: https://support.google.com/analytics/answer/9234069 */
228
+ type AutomaticallyCollectedEvents = EnhancedMeasurementEvents & {
229
+ first_visit: {
230
+ page_path: string;
231
+ page_title: string;
232
+ page_referrer?: string;
233
+ page_location?: string;
234
+ };
235
+ first_open: {
236
+ screen_name: string;
237
+ screen_class: string;
238
+ };
239
+ in_app_purchase: {
240
+ product_id: string;
241
+ price: number;
242
+ value: number;
243
+ currency: string;
244
+ quantity: number;
245
+ subscription?: boolean;
246
+ free_trial?: boolean;
247
+ introductory_price?: number;
248
+ };
249
+ notification_dismiss: {
250
+ topic: string;
251
+ label: string;
252
+ message_id: string;
253
+ message_name: string;
254
+ message_time: number;
255
+ message_device_time: number;
256
+ message_channel: string;
257
+ };
258
+ notification_foreground: {
259
+ topic: string;
260
+ label: string;
261
+ message_id: string;
262
+ message_name: string;
263
+ message_type: string;
264
+ message_time: number;
265
+ message_device_time: number;
266
+ message_channel: string;
267
+ };
268
+ notification_open: {
269
+ topic: string;
270
+ label: string;
271
+ message_id: string;
272
+ message_name: string;
273
+ message_time: number;
274
+ message_device_time: number;
275
+ message_channel: string;
276
+ };
277
+ notification_receive: {
278
+ topic: string;
279
+ label: string;
280
+ message_id: string;
281
+ message_name: string;
282
+ message_type: string;
283
+ message_time: number;
284
+ message_device_time: number;
285
+ message_channel: string;
286
+ };
287
+ session_start: undefined;
288
+ user_engagement: {
289
+ engagement_time_msec: number;
290
+ trigger: 'pagehide' | 'visibilitychange' | 'background';
291
+ };
292
+ };
293
+ /**
294
+ * ref: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
295
+ * ref: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event
296
+ * */
297
+ type RecommendedEvents = {
298
+ add_payment_info: {
299
+ currency: string;
300
+ value: number;
301
+ coupon?: string;
302
+ payment_type?: string;
303
+ items: Item[];
304
+ };
305
+ add_shipping_info: {
306
+ currency: string;
307
+ value: number;
308
+ coupon?: string;
309
+ shipping_tier?: string;
310
+ items: Item[];
311
+ };
312
+ add_to_cart: {
313
+ currency: string;
314
+ value: number;
315
+ items: Item[];
316
+ };
317
+ add_to_wishlist: {
318
+ currency: string;
319
+ value: number;
320
+ items: Item[];
321
+ };
322
+ begin_checkout: {
323
+ currency: string;
324
+ value: number;
325
+ coupon?: string;
326
+ items: Item[];
327
+ source?: string;
328
+ };
329
+ close_convert_lead: {
330
+ currency: string;
331
+ value: number;
332
+ };
333
+ close_unconvert_lead: {
334
+ currency: string;
335
+ value: number;
336
+ unconvert_lead_reason?: string;
337
+ };
338
+ disqualify_lead: {
339
+ currency: string;
340
+ value: number;
341
+ disqualified_lead_reason?: string;
342
+ };
343
+ earn_virtual_currency: {
344
+ virtual_currency_name?: string;
345
+ value?: number;
346
+ };
347
+ generate_lead: {
348
+ currency: string;
349
+ value: number;
350
+ lead_source?: string;
351
+ };
352
+ join_group: {
353
+ group_id?: string;
354
+ };
355
+ level_end: {
356
+ level_name?: string;
357
+ success?: boolean;
358
+ };
359
+ level_start: {
360
+ level_name?: string;
361
+ };
362
+ level_up: {
363
+ level?: number;
364
+ level_name?: string;
365
+ character?: string;
366
+ };
367
+ login: {
368
+ method?: 'google' | 'apple' | 'facebook' | 'twitter' | 'linkedin' | 'github' | 'microsoft' | 'wechat' | 'onetap' | 'phone' | 'email' | (string & {});
369
+ source?: string;
370
+ };
371
+ post_score: {
372
+ score: number;
373
+ level?: number;
374
+ character?: string;
375
+ };
376
+ purchase: {
377
+ currency: string;
378
+ value: number;
379
+ transaction_id: string;
380
+ coupon?: string;
381
+ shipping?: number;
382
+ tax?: number;
383
+ items?: Item[];
384
+ source?: string;
385
+ };
386
+ qualify_lead: {
387
+ currency: string;
388
+ value: number;
389
+ };
390
+ refund: {
391
+ currency: string;
392
+ value: number;
393
+ transaction_id: string;
394
+ coupon?: string;
395
+ shipping?: number;
396
+ tax?: number;
397
+ items?: Item[];
398
+ };
399
+ remove_from_cart: {
400
+ currency: string;
401
+ value: number;
402
+ items: Item[];
403
+ };
404
+ search: {
405
+ search_term: string;
406
+ };
407
+ select_content: {
408
+ content_type?: string;
409
+ content_id?: string;
410
+ };
411
+ select_item: {
412
+ item_list_id?: string;
413
+ item_list_name?: string;
414
+ items: Item[];
415
+ };
416
+ select_promotion: {
417
+ creative_name?: string;
418
+ creative_slot?: string;
419
+ promotion_id?: string;
420
+ promotion_name?: string;
421
+ items?: (Item & PromotionItem)[];
422
+ };
423
+ share: {
424
+ method?: string;
425
+ content_type?: string;
426
+ item_id?: string;
427
+ system_activity_type?: string;
428
+ platform_post_id?: string;
429
+ };
430
+ sign_up: {
431
+ method?: string;
432
+ source?: string;
433
+ };
434
+ spend_virtual_currency: {
435
+ value: number;
436
+ virtual_currency_name: string;
437
+ item_name?: string;
438
+ };
439
+ tutorial_begin: undefined;
440
+ tutorial_complete: undefined;
441
+ unlock_achievement: {
442
+ achievement_id: string;
443
+ };
444
+ view_cart: {
445
+ currency: string;
446
+ value: number;
447
+ items: Item[];
448
+ };
449
+ view_item: {
450
+ currency: string;
451
+ value: number;
452
+ items: Item[];
453
+ };
454
+ view_item_list: {
455
+ currency: string;
456
+ item_list_id?: string;
457
+ item_list_name?: string;
458
+ items: Item[];
459
+ };
460
+ view_promotion: {
461
+ creative_name?: string;
462
+ creative_slot?: string;
463
+ promotion_id?: string;
464
+ promotion_name?: string;
465
+ items: (Item & PromotionItem)[];
466
+ };
467
+ working_lead: {
468
+ currency: string;
469
+ value: number;
470
+ lead_status?: string;
471
+ };
472
+ ad_impression: {
473
+ value?: number;
474
+ currency?: string;
475
+ ad_format?: string;
476
+ ad_platform?: string;
477
+ ad_source?: string;
478
+ ad_unit_name?: string;
479
+ };
480
+ app_open: undefined;
481
+ campaign_details: {
482
+ source: string;
483
+ medium: string;
484
+ campaign: string;
485
+ term?: string;
486
+ content?: string;
487
+ aclid?: string;
488
+ cp1?: string;
489
+ };
490
+ screen_view: {
491
+ screen_name?: string;
492
+ screen_class?: string;
493
+ previous_screen_class?: string;
494
+ engagement_time_msec?: number;
495
+ };
496
+ };
497
+ /**
498
+ * Extra commonly used events that are NOT part of the GA standard event set.
499
+ * Added to satisfy additional analytics needs.
500
+ */
501
+ type AddedRecommendedEvents = {
502
+ logout: undefined;
503
+ trial_begin: {
504
+ currency: string;
505
+ value: number;
506
+ source?: string;
507
+ items?: Item[];
508
+ };
509
+ subscribe: {
510
+ currency: string;
511
+ value: number;
512
+ source?: string;
513
+ items?: Item[];
514
+ };
515
+ survey_shown: SurveyProperties;
516
+ survey_sent: SurveyProperties & SurveyQA;
517
+ survey_dismissed: SurveyProperties;
518
+ /**
519
+ * Net promoter score: Get an industry-recognized benchmark
520
+ * How likely are you to recommend us to a friend?
521
+ * */
522
+ nps_shown: SurveyProperties;
523
+ nps_sent: SurveyProperties & {
524
+ score: NPSScore;
525
+ feedback?: string;
526
+ };
527
+ nps_dismissed: SurveyProperties;
528
+ /**
529
+ * Customer satisfaction score: Works best after a checkout or support flow
530
+ * How satisfied are you with xxx?
531
+ * */
532
+ cast_shown: SurveyProperties;
533
+ cast_sent: SurveyProperties & {
534
+ score: CASTScore;
535
+ feedback?: string;
536
+ };
537
+ cast_dismissed: SurveyProperties;
538
+ /**
539
+ * Customer effort score: Works well with churn surveys
540
+ * How easy is it to use the feature?
541
+ * */
542
+ ces_shown: SurveyProperties;
543
+ ces_sent: SurveyProperties & {
544
+ score: CESScore;
545
+ feedback?: string;
546
+ };
547
+ ces_dismissed: SurveyProperties;
548
+ };
549
+ type StandardEvents = AutomaticallyCollectedEvents & RecommendedEvents & AddedRecommendedEvents;
550
+ /**
551
+ * reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/config
552
+ * reference: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag
553
+ */
554
+ interface Gtag {
555
+ /**
556
+ * To disable advertising features based on third-party advertising identifiers, set
557
+ * allow_google_signals to false.
558
+ *
559
+ * @param event
560
+ * @param option
561
+ * @param allow - Whether to allow Google signals.
562
+ * @default true
563
+ */
564
+ gtag(event: 'set', option: 'allow_google_signals', allow: boolean): void;
565
+ /**
566
+ * Set to false to disable advertising personalization features.
567
+ *
568
+ * @param event
569
+ * @param option
570
+ * @param allow - Whether to allow ad personalization signals.
571
+ * @default true
572
+ */
573
+ gtag(event: 'set', option: 'allow_ad_personalization_signals', allow: boolean): void;
574
+ /**
575
+ * Used for A/B testing and content-targeted ads. Use campaign_content to differentiate ads or
576
+ * links that point to the same URL.
577
+ */
578
+ gtag(event: 'set', option: 'campaign_content', content: string): void;
579
+ /**
580
+ * Used to identify which campaign this referral references. Use campaign_id to identify a
581
+ * specific campaign.
582
+ */
583
+ gtag(event: 'set', option: 'campaign_id', id: string): void;
584
+ /** Use campaign_medium to identify a medium such as email or cost-per-click. */
585
+ gtag(event: 'set', option: 'campaign_medium', medium: CampaignMedium): void;
586
+ /**
587
+ * Used for keyword analysis. Use campaign_name to identify a specific product promotion or
588
+ * strategic campaign.
589
+ */
590
+ gtag(event: 'set', option: 'campaign_name', name: string): void;
591
+ /** Use campaign_source to identify a search engine, newsletter name, or other source. */
592
+ gtag(event: 'set', option: 'campaign_source', source: CampaignSource): void;
593
+ /** Used for paid search. Use campaign_term to note the keywords for this ad. */
594
+ gtag(event: 'set', option: 'campaign_term', term: string): void;
595
+ /**
596
+ * @deprecated
597
+ * Key Point: Use the campaign_ prefixed version of each campaign value instead of this field.
598
+ */
599
+ gtag(event: 'set', option: 'campaign', params: Campaign): void;
600
+ /**
601
+ * Pseudonymously identifies a browser instance. By default, this value is stored as part of the
602
+ * first-party Analytics cookie with a two-year expiration.
603
+ */
604
+ gtag(event: 'set', option: 'client_id', id: string): void;
605
+ /** example: gtag('set', 'content_group', '/news/sports'); */
606
+ gtag(event: 'set', option: 'content_group', group: string): void;
607
+ /**
608
+ * Specifies the domain used to store the analytics cookie.
609
+ * Set to 'none' to set the cookie without specifying a domain.
610
+ * Set to 'auto' (the default value) to set the cookie to the top level domain plus one
611
+ * subdomain (eTLD +1). For example, if cookie_domain is set to 'auto' https://example.com would
612
+ * use example.com for the domain, and https://subdomain.example.com would also use example.com
613
+ * for the domain.
614
+ *
615
+ * @param event
616
+ * @param option
617
+ * @param domain - The domain used to store the analytics cookie.
618
+ * @default 'auto'
619
+ */
620
+ gtag(event: 'set', option: 'cookie_domain', domain: 'none' | 'auto' | (string & {})): void;
621
+ /**
622
+ * Every time a hit is sent to Google Analytics, the cookie expiration time is updated to be the
623
+ * current time plus the value of the cookie_expires field. This means that if you use the default
624
+ * value time of two years (63,072,000 seconds), and a user visits your site every month, their
625
+ * cookie will never expire.
626
+ *
627
+ * If you set the cookie_expires time to 0 (zero) seconds, the cookie turns into a session-based
628
+ * cookie and expires once the current browser session ends.
629
+ *
630
+ * Caution: If you set the cookie to expire too quickly, you will inflate your user count and
631
+ * decrease the quality of your measurement.
632
+ *
633
+ * @param event
634
+ * @param option
635
+ * @param expires - The number of seconds until the cookie expires.
636
+ * @default 63072000
637
+ */
638
+ gtag(event: 'set', option: 'cookie_expires', expires: number): void;
639
+ /**
640
+ * Appends additional flags to the cookie when set. Flags must be separated by semicolons. See
641
+ * [write a new cookie](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie) for some examples of flags to set.
642
+ */
643
+ gtag(event: 'set', option: 'cookie_flags', flags: string): void;
644
+ /** Specifies the subpath used to store the analytics cookie. */
645
+ gtag(event: 'set', option: 'cookie_path', path: string): void;
646
+ /** Specifies a prefix to prepend to analytics cookie names. */
647
+ gtag(event: 'set', option: 'cookie_prefix', prefix: string): void;
648
+ /**
649
+ * When cookie_update is set to true, gtag.js will update cookies on each page load. This will
650
+ * update the cookie expiration to be set relative to the most recent visit to the site. For
651
+ * example, if cookie expiration is set to one week, and a user visits using the same browser
652
+ * every five days, the cookie expiration will be updated on each visit and will effectively
653
+ * never expire.
654
+ *
655
+ * When set to false, cookies are not updated on each page load. This has the effect of cookie
656
+ * expiration being relative to the first time a user visited the site.
657
+ *
658
+ * @param event
659
+ * @param option
660
+ * @param update - Whether to update the cookie on each page load.
661
+ * @default true
662
+ */
663
+ gtag(event: 'set', option: 'cookie_update', update: boolean): void;
664
+ /**
665
+ * Set to true to indicate to Analytics that the referrer shouldn't be displayed as a traffic
666
+ * source. [Learn when to use this field](https://support.google.com/analytics/answer/10327750#set-parameter)
667
+ *
668
+ * @param event
669
+ * @param option
670
+ * @param ignore - Whether to ignore the referrer.
671
+ * @default false
672
+ */
673
+ gtag(event: 'set', option: 'ignore_referrer', ignore: boolean): void;
674
+ /**
675
+ * Specifies the language preference of the user. Defaults to the user's `navigator.language` value.
676
+ *
677
+ * @param event
678
+ * @param option
679
+ * @param language - The language preference of the user.
680
+ * @default navigator.language
681
+ */
682
+ gtag(event: 'set', option: 'language', language: string): void;
683
+ /**
684
+ * Specifies the full URL of the page. Defaults to the user's `document.location` value.
685
+ *
686
+ * @param event
687
+ * @param option
688
+ * @param location - The full URL of the page. Character limit 1000
689
+ * @default document.location
690
+ */
691
+ gtag(event: 'set', option: 'page_location', location: string): void;
692
+ /**
693
+ * Specifies which referral source brought traffic to a page. This value is also used to compute
694
+ * the traffic source. The format of this value is a URL. Defaults to the user's `document.referrer`
695
+ * value.
696
+ *
697
+ * @param event
698
+ * @param option
699
+ * @param referrer - The referral source. Character limit 420
700
+ * @default document.referrer
701
+ */
702
+ gtag(event: 'set', option: 'page_referrer', referrer: string): void;
703
+ /**
704
+ * The title of the page or document. Defaults to the user's `document.title` value.
705
+ *
706
+ * @param event
707
+ * @param option
708
+ * @param title - The title of the page or document. Character limit 300
709
+ * @default document.title
710
+ */
711
+ gtag(event: 'set', option: 'page_title', title: string): void;
712
+ /**
713
+ * Set to false to prevent the default snippet from sending a page_view.
714
+ *
715
+ * @param event
716
+ * @param option
717
+ * @param send - Whether to send a page_view.
718
+ * @default true
719
+ */
720
+ gtag(event: 'set', option: 'send_page_view', send: boolean): void;
721
+ /**
722
+ * Specifies the resolution of the screen. Should be two positive integers separated by an x. For
723
+ * example, for an 800px by 600px screen, the value would be 800x600. Calculated from the user's
724
+ * window.screen value.
725
+ *
726
+ * @param event
727
+ * @param option
728
+ * @param resolution - The resolution of the screen.
729
+ * @default window.screen
730
+ */
731
+ gtag(event: 'set', option: 'screen_resolution', resolution: `${number}x${number}`): void;
732
+ /**
733
+ * Specifies a known identifier for a user provided by the site owner/library user. It must not
734
+ * itself be PII (personally identifiable information). The value should never be persisted in
735
+ * Google Analytics cookies or other Analytics-provided storage.
736
+ *
737
+ * @param event
738
+ * @param option
739
+ * @param userId - The user ID. Character limit 256
740
+ */
741
+ gtag(event: 'set', option: 'user_id', userId: string): void;
742
+ /**
743
+ * User properties are attributes that can be used to describe segments of your user base, such
744
+ * as language preference or geographic location. Up to 25 additional user properties can be set
745
+ * per project.
746
+ *
747
+ * @param event
748
+ * @param option
749
+ * @param properties
750
+ */
751
+ gtag(event: 'set', option: 'user_properties', properties: UserProperties): void;
752
+ gtag(event: 'set', option: 'user_data', data: UserProvidedData): void;
753
+ /**
754
+ * gtag('config', ...) Set for a single stream
755
+ * gtag('set', ...) Set globally
756
+ */
757
+ gtag(event: 'config', gaId: GaId, config?: Config): void;
758
+ gtag<T extends string>(event: 'event', eventName: T extends keyof StandardEvents ? T : string, eventParams?: T extends keyof StandardEvents ? StandardEvents[T] : Record<string, string | number | boolean | null | undefined>): void;
759
+ }
760
+ //#endregion
761
+ export { AddedRecommendedEvents, AutomaticallyCollectedEvents, CASTScore, CESScore, Campaign, CampaignMedium, CampaignSource, Config, EnhancedMeasurementEvents, GaId, Gtag, GtmId, Item, NPSScore, PromotionItem, RecommendedEvents, ReservedEventNames, ReservedEventValues, ReservedUserPropertiesNames, StandardEvents, SurveyProperties, SurveyQA, UserProperties, UserPropertiesValue, UserProvidedData, reservedEventNames };
762
+ //# sourceMappingURL=gtag.d.mts.map