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