@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.
- package/README.md +50 -3
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/constants/storage.cjs +12 -37
- package/dist/constants/storage.cjs.map +1 -1
- package/dist/constants/storage.d.cts +10 -8
- package/dist/constants/storage.d.cts.map +1 -0
- package/dist/constants/storage.d.mts +13 -0
- package/dist/constants/storage.d.mts.map +1 -0
- package/dist/constants/storage.mjs +12 -13
- package/dist/constants/storage.mjs.map +1 -1
- package/dist/feedback/index.cjs +14 -40
- package/dist/feedback/index.cjs.map +1 -1
- package/dist/feedback/index.d.cts +4 -4
- package/dist/feedback/index.d.cts.map +1 -0
- package/dist/feedback/index.d.mts +6 -0
- package/dist/feedback/index.d.mts.map +1 -0
- package/dist/feedback/index.mjs +12 -14
- package/dist/feedback/index.mjs.map +1 -1
- package/dist/hooks/use-app-analytics.cjs +46 -65
- package/dist/hooks/use-app-analytics.cjs.map +1 -1
- package/dist/hooks/use-app-analytics.d.cts +3 -1
- package/dist/hooks/use-app-analytics.d.cts.map +1 -0
- package/dist/hooks/use-app-analytics.d.mts +5 -0
- package/dist/hooks/use-app-analytics.d.mts.map +1 -0
- package/dist/hooks/use-app-analytics.mjs +41 -36
- package/dist/hooks/use-app-analytics.mjs.map +1 -1
- package/dist/hooks/use-click-id-persistence.cjs +43 -65
- package/dist/hooks/use-click-id-persistence.cjs.map +1 -1
- package/dist/hooks/use-click-id-persistence.d.cts +3 -1
- package/dist/hooks/use-click-id-persistence.d.cts.map +1 -0
- package/dist/hooks/use-click-id-persistence.d.mts +5 -0
- package/dist/hooks/use-click-id-persistence.d.mts.map +1 -0
- package/dist/hooks/use-click-id-persistence.mjs +40 -38
- package/dist/hooks/use-click-id-persistence.mjs.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.cjs +33 -55
- package/dist/hooks/use-outbound-click-analytics.cjs.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.cts +3 -1
- package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -0
- package/dist/hooks/{use-outbound-click-analytics.d.ts → use-outbound-click-analytics.d.mts} +3 -1
- package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -0
- package/dist/hooks/use-outbound-click-analytics.mjs +31 -29
- package/dist/hooks/use-outbound-click-analytics.mjs.map +1 -1
- package/dist/hooks/use-previous.cjs +11 -35
- package/dist/hooks/use-previous.cjs.map +1 -1
- package/dist/hooks/use-previous.d.cts +3 -1
- package/dist/hooks/use-previous.d.cts.map +1 -0
- package/dist/hooks/use-previous.d.mts +5 -0
- package/dist/hooks/use-previous.d.mts.map +1 -0
- package/dist/hooks/use-previous.mjs +9 -9
- package/dist/hooks/use-previous.mjs.map +1 -1
- package/dist/hooks/use-track-impression.cjs +24 -51
- package/dist/hooks/use-track-impression.cjs.map +1 -1
- package/dist/hooks/use-track-impression.d.cts +5 -6
- package/dist/hooks/use-track-impression.d.cts.map +1 -0
- package/dist/hooks/use-track-impression.d.mts +6 -0
- package/dist/hooks/use-track-impression.d.mts.map +1 -0
- package/dist/hooks/use-track-impression.mjs +22 -25
- package/dist/hooks/use-track-impression.mjs.map +1 -1
- package/dist/hooks/use-web-analytics.cjs +98 -109
- package/dist/hooks/use-web-analytics.cjs.map +1 -1
- package/dist/hooks/use-web-analytics.d.cts +3 -1
- package/dist/hooks/use-web-analytics.d.cts.map +1 -0
- package/dist/hooks/{use-web-analytics.d.ts → use-web-analytics.d.mts} +3 -1
- package/dist/hooks/use-web-analytics.d.mts.map +1 -0
- package/dist/hooks/use-web-analytics.mjs +93 -80
- package/dist/hooks/use-web-analytics.mjs.map +1 -1
- package/dist/index.cjs +28 -74
- package/dist/index.d.cts +11 -13
- package/dist/index.d.mts +11 -0
- package/dist/index.mjs +3 -34
- package/dist/link/index.cjs +31 -58
- package/dist/link/index.cjs.map +1 -1
- package/dist/link/index.d.cts +7 -7
- package/dist/link/index.d.cts.map +1 -0
- package/dist/link/index.d.mts +11 -0
- package/dist/link/index.d.mts.map +1 -0
- package/dist/link/index.mjs +28 -31
- package/dist/link/index.mjs.map +1 -1
- package/dist/native/fbsdk.cjs +12 -34
- package/dist/native/fbsdk.cjs.map +1 -1
- package/dist/native/fbsdk.d.cts +4 -4
- package/dist/native/fbsdk.d.cts.map +1 -0
- package/dist/native/{fbsdk.d.ts → fbsdk.d.mts} +4 -4
- package/dist/native/fbsdk.d.mts.map +1 -0
- package/dist/native/fbsdk.mjs +10 -8
- package/dist/native/fbsdk.mjs.map +1 -1
- package/dist/native/fingerprint.cjs +41 -64
- package/dist/native/fingerprint.cjs.map +1 -1
- package/dist/native/fingerprint.d.cts +22 -20
- package/dist/native/fingerprint.d.cts.map +1 -0
- package/dist/native/fingerprint.d.mts +28 -0
- package/dist/native/fingerprint.d.mts.map +1 -0
- package/dist/native/fingerprint.mjs +36 -42
- package/dist/native/fingerprint.mjs.map +1 -1
- package/dist/native/firebase.cjs +12 -39
- package/dist/native/firebase.cjs.map +1 -1
- package/dist/native/firebase.d.cts +4 -4
- package/dist/native/firebase.d.cts.map +1 -0
- package/dist/native/firebase.d.mts +6 -0
- package/dist/native/firebase.d.mts.map +1 -0
- package/dist/native/firebase.mjs +10 -13
- package/dist/native/firebase.mjs.map +1 -1
- package/dist/native/index.cjs +11 -45
- package/dist/native/index.d.cts +4 -7
- package/dist/native/index.d.mts +4 -0
- package/dist/native/index.mjs +2 -12
- package/dist/native/posthog.cjs +5 -30
- package/dist/native/posthog.cjs.map +1 -1
- package/dist/native/posthog.d.cts +3 -1
- package/dist/native/posthog.d.cts.map +1 -0
- package/dist/native/posthog.d.mts +5 -0
- package/dist/native/posthog.d.mts.map +1 -0
- package/dist/native/posthog.mjs +5 -6
- package/dist/native/posthog.mjs.map +1 -1
- package/dist/native/setup.cjs +91 -129
- package/dist/native/setup.cjs.map +1 -1
- package/dist/native/setup.d.cts +6 -6
- package/dist/native/setup.d.cts.map +1 -0
- package/dist/native/{setup.d.ts → setup.d.mts} +6 -6
- package/dist/native/setup.d.mts.map +1 -0
- package/dist/native/setup.mjs +83 -105
- package/dist/native/setup.mjs.map +1 -1
- package/dist/next/index.cjs +72 -145
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +18 -19
- package/dist/next/index.d.cts.map +1 -0
- package/dist/next/index.d.mts +21 -0
- package/dist/next/index.d.mts.map +1 -0
- package/dist/next/index.mjs +65 -107
- package/dist/next/index.mjs.map +1 -1
- package/dist/react-router/index.cjs +80 -144
- package/dist/react-router/index.cjs.map +1 -1
- package/dist/react-router/index.d.cts +18 -19
- package/dist/react-router/index.d.cts.map +1 -0
- package/dist/react-router/index.d.mts +21 -0
- package/dist/react-router/index.d.mts.map +1 -0
- package/dist/react-router/index.mjs +75 -115
- package/dist/react-router/index.mjs.map +1 -1
- package/dist/schema/index.cjs +188 -233
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +236 -235
- package/dist/schema/index.d.cts.map +1 -0
- package/dist/schema/index.d.mts +325 -0
- package/dist/schema/index.d.mts.map +1 -0
- package/dist/schema/index.mjs +178 -222
- package/dist/schema/index.mjs.map +1 -1
- package/dist/server/index.cjs +9 -40
- package/dist/server/index.d.cts +5 -9
- package/dist/server/index.d.mts +5 -0
- package/dist/server/index.mjs +5 -12
- package/dist/server/linkedin-conversions-api.cjs +66 -95
- package/dist/server/linkedin-conversions-api.cjs.map +1 -1
- package/dist/server/linkedin-conversions-api.d.cts +45 -45
- package/dist/server/linkedin-conversions-api.d.cts.map +1 -0
- package/dist/server/linkedin-conversions-api.d.mts +56 -0
- package/dist/server/linkedin-conversions-api.d.mts.map +1 -0
- package/dist/server/linkedin-conversions-api.mjs +63 -68
- package/dist/server/linkedin-conversions-api.mjs.map +1 -1
- package/dist/server/meta-conversions-api.cjs +157 -265
- package/dist/server/meta-conversions-api.cjs.map +1 -1
- package/dist/server/meta-conversions-api.d.cts +8 -9
- package/dist/server/meta-conversions-api.d.cts.map +1 -0
- package/dist/server/meta-conversions-api.d.mts +10 -0
- package/dist/server/meta-conversions-api.d.mts.map +1 -0
- package/dist/server/meta-conversions-api.mjs +151 -243
- package/dist/server/meta-conversions-api.mjs.map +1 -1
- package/dist/server/openai-conversions-api.cjs +69 -96
- package/dist/server/openai-conversions-api.cjs.map +1 -1
- package/dist/server/openai-conversions-api.d.cts +34 -34
- package/dist/server/openai-conversions-api.d.cts.map +1 -0
- package/dist/server/openai-conversions-api.d.mts +47 -0
- package/dist/server/openai-conversions-api.d.mts.map +1 -0
- package/dist/server/openai-conversions-api.mjs +65 -68
- package/dist/server/openai-conversions-api.mjs.map +1 -1
- package/dist/server/reddit-conversions-api.cjs +64 -91
- package/dist/server/reddit-conversions-api.cjs.map +1 -1
- package/dist/server/reddit-conversions-api.d.cts +61 -61
- package/dist/server/reddit-conversions-api.d.cts.map +1 -0
- package/dist/server/reddit-conversions-api.d.mts +75 -0
- package/dist/server/reddit-conversions-api.d.mts.map +1 -0
- package/dist/server/reddit-conversions-api.mjs +59 -62
- package/dist/server/reddit-conversions-api.mjs.map +1 -1
- package/dist/setup/index.cjs +34 -63
- package/dist/setup/index.cjs.map +1 -1
- package/dist/setup/index.d.cts +30 -30
- package/dist/setup/index.d.cts.map +1 -0
- package/dist/setup/index.d.mts +41 -0
- package/dist/setup/index.d.mts.map +1 -0
- package/dist/setup/index.mjs +31 -36
- package/dist/setup/index.mjs.map +1 -1
- package/dist/setup/session.cjs +70 -106
- package/dist/setup/session.cjs.map +1 -1
- package/dist/setup/session.d.cts +26 -24
- package/dist/setup/session.d.cts.map +1 -0
- package/dist/setup/session.d.mts +31 -0
- package/dist/setup/session.d.mts.map +1 -0
- package/dist/setup/session.mjs +68 -80
- package/dist/setup/session.mjs.map +1 -1
- package/dist/tanstack/index.cjs +86 -156
- package/dist/tanstack/index.cjs.map +1 -1
- package/dist/tanstack/index.d.cts +19 -20
- package/dist/tanstack/index.d.cts.map +1 -0
- package/dist/tanstack/index.d.mts +22 -0
- package/dist/tanstack/index.d.mts.map +1 -0
- package/dist/tanstack/index.mjs +81 -127
- package/dist/tanstack/index.mjs.map +1 -1
- package/dist/third-parties/google-analytics.cjs +18 -43
- package/dist/third-parties/google-analytics.cjs.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +7 -7
- package/dist/third-parties/google-analytics.d.cts.map +1 -0
- package/dist/third-parties/google-analytics.d.mts +12 -0
- package/dist/third-parties/google-analytics.d.mts.map +1 -0
- package/dist/third-parties/google-analytics.mjs +16 -17
- package/dist/third-parties/google-analytics.mjs.map +1 -1
- package/dist/third-parties/ignored-events.cjs +35 -68
- package/dist/third-parties/ignored-events.cjs.map +1 -1
- package/dist/third-parties/ignored-events.d.cts +3 -1
- package/dist/third-parties/ignored-events.d.cts.map +1 -0
- package/dist/third-parties/ignored-events.d.mts +5 -0
- package/dist/third-parties/ignored-events.d.mts.map +1 -0
- package/dist/third-parties/ignored-events.mjs +34 -43
- package/dist/third-parties/ignored-events.mjs.map +1 -1
- package/dist/third-parties/index.cjs +16 -53
- package/dist/third-parties/index.d.cts +6 -12
- package/dist/third-parties/index.d.mts +6 -0
- package/dist/third-parties/index.mjs +1 -14
- package/dist/third-parties/linkedin-insight-tag.cjs +28 -50
- package/dist/third-parties/linkedin-insight-tag.cjs.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.cts +8 -9
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -0
- package/dist/third-parties/{linkedin-insight-tag.d.ts → linkedin-insight-tag.d.mts} +8 -9
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -0
- package/dist/third-parties/linkedin-insight-tag.mjs +25 -23
- package/dist/third-parties/linkedin-insight-tag.mjs.map +1 -1
- package/dist/third-parties/meta-pixel.cjs +45 -66
- package/dist/third-parties/meta-pixel.cjs.map +1 -1
- package/dist/third-parties/meta-pixel.d.cts +7 -8
- package/dist/third-parties/meta-pixel.d.cts.map +1 -0
- package/dist/third-parties/meta-pixel.d.mts +12 -0
- package/dist/third-parties/meta-pixel.d.mts.map +1 -0
- package/dist/third-parties/meta-pixel.mjs +41 -38
- package/dist/third-parties/meta-pixel.mjs.map +1 -1
- package/dist/third-parties/openai-pixel.cjs +63 -68
- package/dist/third-parties/openai-pixel.cjs.map +1 -1
- package/dist/third-parties/openai-pixel.d.cts +7 -8
- package/dist/third-parties/openai-pixel.d.cts.map +1 -0
- package/dist/third-parties/{openai-pixel.d.ts → openai-pixel.d.mts} +7 -8
- package/dist/third-parties/openai-pixel.d.mts.map +1 -0
- package/dist/third-parties/openai-pixel.mjs +60 -41
- package/dist/third-parties/openai-pixel.mjs.map +1 -1
- package/dist/third-parties/posthog.cjs +23 -43
- package/dist/third-parties/posthog.cjs.map +1 -1
- package/dist/third-parties/posthog.d.cts +5 -5
- package/dist/third-parties/posthog.d.cts.map +1 -0
- package/dist/third-parties/{posthog.d.ts → posthog.d.mts} +5 -5
- package/dist/third-parties/posthog.d.mts.map +1 -0
- package/dist/third-parties/posthog.mjs +20 -16
- package/dist/third-parties/posthog.mjs.map +1 -1
- package/dist/third-parties/reddit-pixel.cjs +37 -58
- package/dist/third-parties/reddit-pixel.cjs.map +1 -1
- package/dist/third-parties/reddit-pixel.d.cts +7 -8
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -0
- package/dist/third-parties/reddit-pixel.d.mts +12 -0
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -0
- package/dist/third-parties/reddit-pixel.mjs +33 -30
- package/dist/third-parties/reddit-pixel.mjs.map +1 -1
- package/dist/track/fbq.cjs +179 -135
- package/dist/track/fbq.cjs.map +1 -1
- package/dist/track/fbq.d.cts +234 -233
- package/dist/track/fbq.d.cts.map +1 -0
- package/dist/track/fbq.d.mts +280 -0
- package/dist/track/fbq.d.mts.map +1 -0
- package/dist/track/fbq.mjs +176 -108
- package/dist/track/fbq.mjs.map +1 -1
- package/dist/track/gtag.cjs +63 -86
- package/dist/track/gtag.cjs.map +1 -1
- package/dist/track/gtag.d.cts +685 -685
- package/dist/track/gtag.d.cts.map +1 -0
- package/dist/track/gtag.d.mts +762 -0
- package/dist/track/gtag.d.mts.map +1 -0
- package/dist/track/gtag.mjs +62 -61
- package/dist/track/gtag.mjs.map +1 -1
- package/dist/track/index.cjs +111 -136
- package/dist/track/index.cjs.map +1 -1
- package/dist/track/index.d.cts +8 -8
- package/dist/track/index.d.cts.map +1 -0
- package/dist/track/{index.d.ts → index.d.mts} +8 -8
- package/dist/track/index.d.mts.map +1 -0
- package/dist/track/index.mjs +105 -106
- package/dist/track/index.mjs.map +1 -1
- package/dist/track/lintrk.cjs +0 -19
- package/dist/track/lintrk.d.cts +12 -10
- package/dist/track/lintrk.d.cts.map +1 -0
- package/dist/track/lintrk.d.mts +14 -0
- package/dist/track/lintrk.d.mts.map +1 -0
- package/dist/track/lintrk.mjs +1 -1
- package/dist/track/oaiq.cjs +153 -146
- package/dist/track/oaiq.cjs.map +1 -1
- package/dist/track/oaiq.d.cts +65 -64
- package/dist/track/oaiq.d.cts.map +1 -0
- package/dist/track/oaiq.d.mts +112 -0
- package/dist/track/oaiq.d.mts.map +1 -0
- package/dist/track/oaiq.mjs +149 -118
- package/dist/track/oaiq.mjs.map +1 -1
- package/dist/track/rdt.cjs +66 -110
- package/dist/track/rdt.cjs.map +1 -1
- package/dist/track/rdt.d.cts +74 -73
- package/dist/track/rdt.d.cts.map +1 -0
- package/dist/track/rdt.d.mts +97 -0
- package/dist/track/rdt.d.mts.map +1 -0
- package/dist/track/rdt.mjs +63 -83
- package/dist/track/rdt.mjs.map +1 -1
- package/dist/track/types.cjs +0 -19
- package/dist/track/types.d.cts +140 -111
- package/dist/track/types.d.cts.map +1 -0
- package/dist/track/types.d.mts +171 -0
- package/dist/track/types.d.mts.map +1 -0
- package/dist/track/types.mjs +1 -1
- package/dist/utils/field.cjs +8 -32
- package/dist/utils/field.cjs.map +1 -1
- package/dist/utils/field.d.cts +3 -1
- package/dist/utils/field.d.cts.map +1 -0
- package/dist/utils/{field.d.ts → field.d.mts} +3 -1
- package/dist/utils/field.d.mts.map +1 -0
- package/dist/utils/field.mjs +7 -7
- package/dist/utils/field.mjs.map +1 -1
- package/dist/utils/stripe.cjs +25 -49
- package/dist/utils/stripe.cjs.map +1 -1
- package/dist/utils/stripe.d.cts +3 -1
- package/dist/utils/stripe.d.cts.map +1 -0
- package/dist/utils/{stripe.d.ts → stripe.d.mts} +3 -1
- package/dist/utils/stripe.d.mts.map +1 -0
- package/dist/utils/stripe.mjs +23 -23
- package/dist/utils/stripe.mjs.map +1 -1
- package/dist/visitor/index.cjs +54 -86
- package/dist/visitor/index.cjs.map +1 -1
- package/dist/visitor/index.d.cts +4 -5
- package/dist/visitor/index.d.cts.map +1 -0
- package/dist/visitor/{index.d.ts → index.d.mts} +4 -5
- package/dist/visitor/index.d.mts.map +1 -0
- package/dist/visitor/index.mjs +51 -59
- package/dist/visitor/index.mjs.map +1 -1
- package/dist/visitor/types.cjs +0 -19
- package/dist/visitor/types.d.cts +15 -14
- package/dist/visitor/types.d.cts.map +1 -0
- package/dist/visitor/types.d.mts +21 -0
- package/dist/visitor/types.d.mts.map +1 -0
- package/dist/visitor/types.mjs +1 -1
- package/dist/web/index.cjs +108 -148
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +5 -6
- package/dist/web/index.d.cts.map +1 -0
- package/dist/web/index.d.mts +9 -0
- package/dist/web/index.d.mts.map +1 -0
- package/dist/web/index.mjs +101 -109
- package/dist/web/index.mjs.map +1 -1
- package/package.json +103 -50
- package/dist/constants/storage.d.ts +0 -11
- package/dist/feedback/index.d.ts +0 -6
- package/dist/hooks/use-app-analytics.d.ts +0 -3
- package/dist/hooks/use-click-id-persistence.d.ts +0 -3
- package/dist/hooks/use-previous.d.ts +0 -3
- package/dist/hooks/use-track-impression.d.ts +0 -7
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -13
- package/dist/index.mjs.map +0 -1
- package/dist/link/index.d.ts +0 -11
- package/dist/native/fingerprint.d.ts +0 -26
- package/dist/native/firebase.d.ts +0 -6
- package/dist/native/index.cjs.map +0 -1
- package/dist/native/index.d.ts +0 -7
- package/dist/native/index.mjs.map +0 -1
- package/dist/native/posthog.d.ts +0 -3
- package/dist/next/index.d.ts +0 -22
- package/dist/react-router/index.d.ts +0 -22
- package/dist/schema/index.d.ts +0 -324
- package/dist/server/index.cjs.map +0 -1
- package/dist/server/index.d.ts +0 -9
- package/dist/server/index.mjs.map +0 -1
- package/dist/server/linkedin-conversions-api.d.ts +0 -56
- package/dist/server/meta-conversions-api.d.ts +0 -11
- package/dist/server/openai-conversions-api.d.ts +0 -47
- package/dist/server/reddit-conversions-api.d.ts +0 -75
- package/dist/setup/index.d.ts +0 -41
- package/dist/setup/session.d.ts +0 -29
- package/dist/tanstack/index.d.ts +0 -23
- package/dist/third-parties/google-analytics.d.ts +0 -12
- package/dist/third-parties/ignored-events.d.ts +0 -3
- package/dist/third-parties/index.cjs.map +0 -1
- package/dist/third-parties/index.d.ts +0 -12
- package/dist/third-parties/index.mjs.map +0 -1
- package/dist/third-parties/meta-pixel.d.ts +0 -13
- package/dist/third-parties/reddit-pixel.d.ts +0 -13
- package/dist/track/fbq.d.ts +0 -279
- package/dist/track/gtag.d.ts +0 -762
- package/dist/track/lintrk.cjs.map +0 -1
- package/dist/track/lintrk.d.ts +0 -12
- package/dist/track/lintrk.mjs.map +0 -1
- package/dist/track/oaiq.d.ts +0 -111
- package/dist/track/rdt.d.ts +0 -96
- package/dist/track/types.cjs.map +0 -1
- package/dist/track/types.d.ts +0 -142
- package/dist/track/types.mjs.map +0 -1
- package/dist/visitor/types.cjs.map +0 -1
- package/dist/visitor/types.d.ts +0 -20
- package/dist/visitor/types.mjs.map +0 -1
- package/dist/web/index.d.ts +0 -10
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/track/lintrk.ts"],"sourcesContent":["export interface Lintrk {\n lintrk(event: 'track', params: { conversion_id: number; event_id?: string }): void;\n\n /** reference: https://www.linkedin.com/help/lms/answer/a6246095 */\n lintrk(event: 'setUserData', params: { email: string }): void;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/track/lintrk.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface Lintrk {
|
|
2
|
-
lintrk(event: 'track', params: {
|
|
3
|
-
conversion_id: number;
|
|
4
|
-
event_id?: string;
|
|
5
|
-
}): void;
|
|
6
|
-
/** reference: https://www.linkedin.com/help/lms/answer/a6246095 */
|
|
7
|
-
lintrk(event: 'setUserData', params: {
|
|
8
|
-
email: string;
|
|
9
|
-
}): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type { Lintrk };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/track/oaiq.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Item } from './gtag.js';
|
|
2
|
-
import { EventName, TrackName, TrackProperties } from './types.js';
|
|
3
|
-
|
|
4
|
-
declare const NON_AD_EVENTS: string[];
|
|
5
|
-
/**
|
|
6
|
-
* Content item shared by `contents` and `plan_enrollment` events.
|
|
7
|
-
* https://developers.openai.com/ads/supported-events
|
|
8
|
-
*/
|
|
9
|
-
type ContentItem = {
|
|
10
|
-
id?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
content_type?: string;
|
|
13
|
-
quantity?: number;
|
|
14
|
-
/** Per-item monetary value in ISO 4217 minor units (e.g., 12,999 = $129.99 USD). */
|
|
15
|
-
amount?: number;
|
|
16
|
-
currency?: string;
|
|
17
|
-
};
|
|
18
|
-
type ContentsData = {
|
|
19
|
-
type: 'contents';
|
|
20
|
-
/** Monetary value in ISO 4217 minor units (e.g., 12,999 = $129.99 USD). */
|
|
21
|
-
amount?: number;
|
|
22
|
-
currency?: string;
|
|
23
|
-
contents?: ContentItem[];
|
|
24
|
-
};
|
|
25
|
-
type CustomerActionData = {
|
|
26
|
-
type: 'customer_action';
|
|
27
|
-
amount?: number;
|
|
28
|
-
currency?: string;
|
|
29
|
-
};
|
|
30
|
-
type PlanEnrollmentData = {
|
|
31
|
-
type: 'plan_enrollment';
|
|
32
|
-
plan_id?: string;
|
|
33
|
-
amount?: number;
|
|
34
|
-
currency?: string;
|
|
35
|
-
contents?: ContentItem[];
|
|
36
|
-
};
|
|
37
|
-
type CustomEventData = {
|
|
38
|
-
type: 'custom';
|
|
39
|
-
amount?: number;
|
|
40
|
-
currency?: string;
|
|
41
|
-
contents?: ContentItem[];
|
|
42
|
-
};
|
|
43
|
-
type EventData = ContentsData | CustomerActionData | PlanEnrollmentData | CustomEventData;
|
|
44
|
-
/**
|
|
45
|
-
* Standard event names and the `data` shape each one expects.
|
|
46
|
-
* https://developers.openai.com/ads/supported-events
|
|
47
|
-
*/
|
|
48
|
-
type StandardEvents = {
|
|
49
|
-
appointment_scheduled: CustomerActionData;
|
|
50
|
-
checkout_started: ContentsData;
|
|
51
|
-
contents_viewed: ContentsData;
|
|
52
|
-
items_added: ContentsData;
|
|
53
|
-
lead_created: CustomerActionData;
|
|
54
|
-
order_created: ContentsData;
|
|
55
|
-
page_viewed: ContentsData;
|
|
56
|
-
registration_completed: CustomerActionData;
|
|
57
|
-
subscription_created: PlanEnrollmentData;
|
|
58
|
-
trial_started: PlanEnrollmentData;
|
|
59
|
-
};
|
|
60
|
-
type StandardEvent = keyof StandardEvents;
|
|
61
|
-
/**
|
|
62
|
-
* Identity fields passed to `oaiq("init", ...)` for conversion matching. Email and external id
|
|
63
|
-
* must be pre-hashed as lowercase 64-char SHA-256 hex strings; the rest are sent as raw values.
|
|
64
|
-
* https://developers.openai.com/ads/measurement-pixel
|
|
65
|
-
*/
|
|
66
|
-
type OAIQUser = {
|
|
67
|
-
email_sha256?: string;
|
|
68
|
-
external_id_sha256?: string;
|
|
69
|
-
/** Two-letter ISO 3166-1 country code (e.g. "US"). */
|
|
70
|
-
country?: string;
|
|
71
|
-
/** Lowercased, max 128 characters. */
|
|
72
|
-
city?: string;
|
|
73
|
-
/** Max 32 characters. */
|
|
74
|
-
zip_code?: string;
|
|
75
|
-
};
|
|
76
|
-
type InitConfig = {
|
|
77
|
-
pixelId: string;
|
|
78
|
-
/** Log SDK activity to the browser console. */
|
|
79
|
-
debug?: boolean;
|
|
80
|
-
user?: OAIQUser;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Fourth argument of `oaiq("measure", ...)`. Required for custom events (carries
|
|
84
|
-
* `custom_event_name`); optional for standard events.
|
|
85
|
-
*/
|
|
86
|
-
type MeasureOptions = {
|
|
87
|
-
/** Shared with the Conversions API to deduplicate the same conversion across browser and server. */
|
|
88
|
-
event_id?: string;
|
|
89
|
-
/** Required for custom events; 1-64 chars of letters, numbers, underscores, or dashes. */
|
|
90
|
-
custom_event_name?: string;
|
|
91
|
-
/** When true, opts the event out of user-level personalization. */
|
|
92
|
-
opt_out?: boolean;
|
|
93
|
-
};
|
|
94
|
-
interface OAIQ {
|
|
95
|
-
oaiq(command: 'init', config: InitConfig): void;
|
|
96
|
-
oaiq<T extends StandardEvent>(command: 'measure', event: T, data: StandardEvents[T], options?: MeasureOptions): void;
|
|
97
|
-
oaiq(command: 'measure', event: 'custom', data: CustomEventData, options: MeasureOptions & {
|
|
98
|
-
custom_event_name: string;
|
|
99
|
-
}): void;
|
|
100
|
-
}
|
|
101
|
-
/** Convert a major-unit amount (e.g., 129.99) into ISO 4217 minor units (e.g., 12,999). */
|
|
102
|
-
declare function toMinorUnits(value?: number, currency?: string): number | undefined;
|
|
103
|
-
declare function mapContents(items?: Item[], currency?: string): ContentItem[] | undefined;
|
|
104
|
-
type MappedOAIEvent = {
|
|
105
|
-
type: StandardEvent | 'custom';
|
|
106
|
-
data: EventData;
|
|
107
|
-
};
|
|
108
|
-
/** Map an internal track event onto an OpenAI standard (or custom) conversion event. */
|
|
109
|
-
declare function mapOAIEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): MappedOAIEvent;
|
|
110
|
-
|
|
111
|
-
export { type ContentItem, type ContentsData, type CustomEventData, type CustomerActionData, type EventData, type InitConfig, type MappedOAIEvent, type MeasureOptions, NON_AD_EVENTS, type OAIQ, type OAIQUser, type PlanEnrollmentData, type StandardEvent, type StandardEvents, mapContents, mapOAIEvent, toMinorUnits };
|
package/dist/track/rdt.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { Item } from './gtag.js';
|
|
2
|
-
import { EventName, TrackName, TrackProperties } from './types.js';
|
|
3
|
-
|
|
4
|
-
/** https://business.reddithelp.com/s/article/about-event-metadata */
|
|
5
|
-
type Product = {
|
|
6
|
-
/**
|
|
7
|
-
* (Required) Product ID: Either the SKU or GTIN, which represents the variant ID, not the
|
|
8
|
-
* parent ID. If there are no variants, pass the assigned ID for that item.
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/** (Optional) Product Category: The group the product belongs to. */
|
|
12
|
-
name?: string;
|
|
13
|
-
/** (Optional) Product Name: The title of the product. */
|
|
14
|
-
category?: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* https://business.reddithelp.com/s/article/supported-conversion-events#supported-conversion-events
|
|
18
|
-
* https://business.reddithelp.com/s/article/about-event-metadata
|
|
19
|
-
* https://business.reddithelp.com/s/article/map-a-catalog-to-a-signal-source
|
|
20
|
-
*/
|
|
21
|
-
type StandardEvents = {
|
|
22
|
-
PageVisit: {
|
|
23
|
-
conversionId?: string;
|
|
24
|
-
products?: Product[];
|
|
25
|
-
};
|
|
26
|
-
ViewContent: {
|
|
27
|
-
conversionId?: string;
|
|
28
|
-
products?: Product[];
|
|
29
|
-
};
|
|
30
|
-
Search: {
|
|
31
|
-
conversionId?: string;
|
|
32
|
-
products?: Product[];
|
|
33
|
-
};
|
|
34
|
-
AddToCart: {
|
|
35
|
-
value?: number;
|
|
36
|
-
currency?: string;
|
|
37
|
-
itemCount?: number;
|
|
38
|
-
conversionId?: string;
|
|
39
|
-
products?: Product[];
|
|
40
|
-
};
|
|
41
|
-
AddToWishlist: {
|
|
42
|
-
value?: number;
|
|
43
|
-
currency?: string;
|
|
44
|
-
itemCount?: number;
|
|
45
|
-
conversionId?: string;
|
|
46
|
-
products?: Product[];
|
|
47
|
-
};
|
|
48
|
-
Purchase: {
|
|
49
|
-
value?: number;
|
|
50
|
-
currency?: string;
|
|
51
|
-
itemCount?: number;
|
|
52
|
-
conversionId?: string;
|
|
53
|
-
products?: Product[];
|
|
54
|
-
};
|
|
55
|
-
Lead: {
|
|
56
|
-
value?: number;
|
|
57
|
-
currency?: string;
|
|
58
|
-
conversionId?: string;
|
|
59
|
-
products?: Product[];
|
|
60
|
-
};
|
|
61
|
-
SignUp: {
|
|
62
|
-
value?: number;
|
|
63
|
-
currency?: string;
|
|
64
|
-
conversionId?: string;
|
|
65
|
-
products?: Product[];
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
type PixelId = `a2_${string}`;
|
|
69
|
-
type MatchKeys = {
|
|
70
|
-
email?: string;
|
|
71
|
-
phoneNumber?: string;
|
|
72
|
-
externalId?: string;
|
|
73
|
-
idfa?: string;
|
|
74
|
-
aaid?: string;
|
|
75
|
-
};
|
|
76
|
-
type CustomEventParams<T extends string = string> = {
|
|
77
|
-
customEventName: T;
|
|
78
|
-
value?: number;
|
|
79
|
-
currency?: string;
|
|
80
|
-
itemCount?: number;
|
|
81
|
-
conversionId?: string;
|
|
82
|
-
products?: Product[];
|
|
83
|
-
};
|
|
84
|
-
interface RDT {
|
|
85
|
-
rdt(event: 'init', pixelId: PixelId, matchKeys?: MatchKeys): void;
|
|
86
|
-
rdt<T extends keyof StandardEvents>(event: 'track', type: T, params?: StandardEvents[T]): void;
|
|
87
|
-
rdt(event: 'track', type: 'Custom', params: CustomEventParams): void;
|
|
88
|
-
}
|
|
89
|
-
type Mapped<F extends keyof StandardEvents> = [F, StandardEvents[F]];
|
|
90
|
-
type Missed<F extends string> = ['Custom', CustomEventParams<F>];
|
|
91
|
-
declare function mapItems(items?: Item[]): undefined | Product[];
|
|
92
|
-
declare function mapRDTEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, eventId?: string): Mapped<keyof StandardEvents> | Missed<TrackName<T>>;
|
|
93
|
-
type ServerStandardEvent = 'PAGE_VISIT' | 'VIEW_CONTENT' | 'SEARCH' | 'ADD_TO_CART' | 'ADD_TO_WISHLIST' | 'PURCHASE' | 'LEAD' | 'SIGN_UP';
|
|
94
|
-
declare function mapServerStandardEvent(name: keyof StandardEvents): ServerStandardEvent;
|
|
95
|
-
|
|
96
|
-
export { type CustomEventParams, type MatchKeys, type PixelId, type Product, type RDT, type ServerStandardEvent, type StandardEvents, mapItems, mapRDTEvent, mapServerStandardEvent };
|
package/dist/track/types.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/track/types.ts"],"sourcesContent":["import type { UserProvidedData as GAUserProvidedData, StandardEvents } from './gtag';\n\nexport type AllowedPropertyValues = string | number | boolean | null;\nexport type EventName = Lowercase<string> | 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';\n\nexport type TrackName<T extends EventName = EventName> = T extends keyof StandardEvents\n ? T\n : EventName;\nexport type TrackProperties<T extends EventName = EventName> = T extends keyof StandardEvents\n ? StandardEvents[T]\n : Record<Lowercase<string>, AllowedPropertyValues>;\n\nexport type Platform = 'ios' | 'android' | 'web' | 'macos' | 'windows' | 'linux' | 'unknown';\nexport type Environment = 'development' | 'production';\n\nexport interface UserData {\n userId: string;\n email?: string;\n firstName?: string;\n lastName?: string;\n phone?: string;\n dateOfBirth?: string;\n gender?: string;\n city?: string;\n state?: string;\n postal?: string;\n country?: string;\n}\n\nexport interface UserProvidedData extends GAUserProvidedData {\n user_id?: string;\n ip_address?: string;\n user_agent?: string;\n gender?: 'female' | 'male';\n birthday?: { year: number; month: number; day: number };\n // meta specific\n fb_login_id?: string;\n fb_page_id?: string;\n}\n\nexport type ThirdPartyTracker = <T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>,\n event_id?: string\n) => void;\n\nexport interface PlatformInfo {\n os?: string;\n os_name?: string;\n os_version?: string;\n browser?: string;\n browser_name?: string;\n browser_version?: string;\n /** @deprecated */\n platform: Platform;\n}\n\nexport interface DeviceInfo {\n device?: string;\n device_id?: string;\n device_type?: string;\n device_vendor?: string;\n device_model_id?: string;\n device_pixel_ratio?: number;\n screen_width?: number;\n screen_height?: number;\n screen_resolution?: `${number}x${number}`;\n}\n\nexport interface AppInfo {\n /** iOS: IDFA, Android: Android Advertising ID */\n advertising_id?: string;\n install_referrer?: string;\n}\n\nexport interface EnvironmentInfo {\n release?: string;\n language?: string;\n time_zone?: string;\n /** @deprecated */\n environment: Environment;\n}\n\nexport interface SourceInfo {\n source_url?: string;\n source?: 'app' | 'web' | 'offline';\n page_referrer?: string;\n}\n\nexport interface AdvertisingInfo {\n /**\n * Meta pixel fields\n * ref: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc\n * Stored in the _fbc/_fbp browser cookie under your domain\n * ref: https://www.facebook.com/business/help/2360940870872492?checkpoint_src=any\n */\n fbc?: string;\n fbp?: string;\n fbclid?: string;\n ad_id?: string;\n ad_name?: string;\n adset_id?: string;\n adset_name?: string;\n campaign_id?: string;\n campaign_name?: string;\n placement?: string;\n site_source_name?: string;\n /** Google Analytics fields */\n gclid?: string;\n gclsrc?: string;\n gad_source?: string;\n gad_campaignid?: string;\n /** Reddit Ads fields */\n rdt_cid?: string;\n rdt_uuid?: string;\n /** LinkedIn Ads fields: get click id from url params or first-party cookie */\n li_fat_id?: string;\n // click ids\n dclid?: string; // Google Display Network\n ko_click_id?: string; // Kakao Ads\n msclkid?: string; // Microsoft Ads (Bing Ads)\n sccid?: string; // Snapchat Ads\n ttclid?: string; // TikTok Ads\n twclid?: string; // Twitter Ads (X Ads)\n wbraid?: string; // Google Ads (for iOS privacy)\n yclid?: string; // Yandex Ads\n}\n\nexport interface UTMParams {\n utm_source?: string;\n utm_medium?: string;\n utm_campaign?: string;\n utm_term?: string;\n utm_content?: string;\n utm_id?: string;\n utm_source_platform?: string;\n utm_creative_format?: string;\n utm_marketing_tactic?: string;\n}\n\nexport interface TrackTags\n extends\n PlatformInfo,\n DeviceInfo,\n AppInfo,\n EnvironmentInfo,\n SourceInfo,\n AdvertisingInfo,\n UTMParams {\n idempotency_key?: string;\n [key: string]: string | number | boolean | null | undefined;\n}\n\nexport interface TrackEvent<T extends EventName = EventName> {\n id: string;\n name: TrackName<T>;\n tags: TrackTags;\n visitor_id: string;\n session_id: string;\n platform: Platform;\n environment: Environment;\n properties?: TrackProperties<T>;\n created_at: string;\n}\n\nexport type TrackEventResponse = {\n /** track event id: Meta Pixel will use event_id and event_name for deduplication */\n id: string;\n}[];\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/track/types.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { StandardEvents, UserProvidedData as UserProvidedData$1 } from './gtag.js';
|
|
2
|
-
|
|
3
|
-
type AllowedPropertyValues = string | number | boolean | null;
|
|
4
|
-
type EventName = Lowercase<string> | 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
|
|
5
|
-
type TrackName<T extends EventName = EventName> = T extends keyof StandardEvents ? T : EventName;
|
|
6
|
-
type TrackProperties<T extends EventName = EventName> = T extends keyof StandardEvents ? StandardEvents[T] : Record<Lowercase<string>, AllowedPropertyValues>;
|
|
7
|
-
type Platform = 'ios' | 'android' | 'web' | 'macos' | 'windows' | 'linux' | 'unknown';
|
|
8
|
-
type Environment = 'development' | 'production';
|
|
9
|
-
interface UserData {
|
|
10
|
-
userId: string;
|
|
11
|
-
email?: string;
|
|
12
|
-
firstName?: string;
|
|
13
|
-
lastName?: string;
|
|
14
|
-
phone?: string;
|
|
15
|
-
dateOfBirth?: string;
|
|
16
|
-
gender?: string;
|
|
17
|
-
city?: string;
|
|
18
|
-
state?: string;
|
|
19
|
-
postal?: string;
|
|
20
|
-
country?: string;
|
|
21
|
-
}
|
|
22
|
-
interface UserProvidedData extends UserProvidedData$1 {
|
|
23
|
-
user_id?: string;
|
|
24
|
-
ip_address?: string;
|
|
25
|
-
user_agent?: string;
|
|
26
|
-
gender?: 'female' | 'male';
|
|
27
|
-
birthday?: {
|
|
28
|
-
year: number;
|
|
29
|
-
month: number;
|
|
30
|
-
day: number;
|
|
31
|
-
};
|
|
32
|
-
fb_login_id?: string;
|
|
33
|
-
fb_page_id?: string;
|
|
34
|
-
}
|
|
35
|
-
type ThirdPartyTracker = <T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>, event_id?: string) => void;
|
|
36
|
-
interface PlatformInfo {
|
|
37
|
-
os?: string;
|
|
38
|
-
os_name?: string;
|
|
39
|
-
os_version?: string;
|
|
40
|
-
browser?: string;
|
|
41
|
-
browser_name?: string;
|
|
42
|
-
browser_version?: string;
|
|
43
|
-
/** @deprecated */
|
|
44
|
-
platform: Platform;
|
|
45
|
-
}
|
|
46
|
-
interface DeviceInfo {
|
|
47
|
-
device?: string;
|
|
48
|
-
device_id?: string;
|
|
49
|
-
device_type?: string;
|
|
50
|
-
device_vendor?: string;
|
|
51
|
-
device_model_id?: string;
|
|
52
|
-
device_pixel_ratio?: number;
|
|
53
|
-
screen_width?: number;
|
|
54
|
-
screen_height?: number;
|
|
55
|
-
screen_resolution?: `${number}x${number}`;
|
|
56
|
-
}
|
|
57
|
-
interface AppInfo {
|
|
58
|
-
/** iOS: IDFA, Android: Android Advertising ID */
|
|
59
|
-
advertising_id?: string;
|
|
60
|
-
install_referrer?: string;
|
|
61
|
-
}
|
|
62
|
-
interface EnvironmentInfo {
|
|
63
|
-
release?: string;
|
|
64
|
-
language?: string;
|
|
65
|
-
time_zone?: string;
|
|
66
|
-
/** @deprecated */
|
|
67
|
-
environment: Environment;
|
|
68
|
-
}
|
|
69
|
-
interface SourceInfo {
|
|
70
|
-
source_url?: string;
|
|
71
|
-
source?: 'app' | 'web' | 'offline';
|
|
72
|
-
page_referrer?: string;
|
|
73
|
-
}
|
|
74
|
-
interface AdvertisingInfo {
|
|
75
|
-
/**
|
|
76
|
-
* Meta pixel fields
|
|
77
|
-
* ref: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters#fbc
|
|
78
|
-
* Stored in the _fbc/_fbp browser cookie under your domain
|
|
79
|
-
* ref: https://www.facebook.com/business/help/2360940870872492?checkpoint_src=any
|
|
80
|
-
*/
|
|
81
|
-
fbc?: string;
|
|
82
|
-
fbp?: string;
|
|
83
|
-
fbclid?: string;
|
|
84
|
-
ad_id?: string;
|
|
85
|
-
ad_name?: string;
|
|
86
|
-
adset_id?: string;
|
|
87
|
-
adset_name?: string;
|
|
88
|
-
campaign_id?: string;
|
|
89
|
-
campaign_name?: string;
|
|
90
|
-
placement?: string;
|
|
91
|
-
site_source_name?: string;
|
|
92
|
-
/** Google Analytics fields */
|
|
93
|
-
gclid?: string;
|
|
94
|
-
gclsrc?: string;
|
|
95
|
-
gad_source?: string;
|
|
96
|
-
gad_campaignid?: string;
|
|
97
|
-
/** Reddit Ads fields */
|
|
98
|
-
rdt_cid?: string;
|
|
99
|
-
rdt_uuid?: string;
|
|
100
|
-
/** LinkedIn Ads fields: get click id from url params or first-party cookie */
|
|
101
|
-
li_fat_id?: string;
|
|
102
|
-
dclid?: string;
|
|
103
|
-
ko_click_id?: string;
|
|
104
|
-
msclkid?: string;
|
|
105
|
-
sccid?: string;
|
|
106
|
-
ttclid?: string;
|
|
107
|
-
twclid?: string;
|
|
108
|
-
wbraid?: string;
|
|
109
|
-
yclid?: string;
|
|
110
|
-
}
|
|
111
|
-
interface UTMParams {
|
|
112
|
-
utm_source?: string;
|
|
113
|
-
utm_medium?: string;
|
|
114
|
-
utm_campaign?: string;
|
|
115
|
-
utm_term?: string;
|
|
116
|
-
utm_content?: string;
|
|
117
|
-
utm_id?: string;
|
|
118
|
-
utm_source_platform?: string;
|
|
119
|
-
utm_creative_format?: string;
|
|
120
|
-
utm_marketing_tactic?: string;
|
|
121
|
-
}
|
|
122
|
-
interface TrackTags extends PlatformInfo, DeviceInfo, AppInfo, EnvironmentInfo, SourceInfo, AdvertisingInfo, UTMParams {
|
|
123
|
-
idempotency_key?: string;
|
|
124
|
-
[key: string]: string | number | boolean | null | undefined;
|
|
125
|
-
}
|
|
126
|
-
interface TrackEvent<T extends EventName = EventName> {
|
|
127
|
-
id: string;
|
|
128
|
-
name: TrackName<T>;
|
|
129
|
-
tags: TrackTags;
|
|
130
|
-
visitor_id: string;
|
|
131
|
-
session_id: string;
|
|
132
|
-
platform: Platform;
|
|
133
|
-
environment: Environment;
|
|
134
|
-
properties?: TrackProperties<T>;
|
|
135
|
-
created_at: string;
|
|
136
|
-
}
|
|
137
|
-
type TrackEventResponse = {
|
|
138
|
-
/** track event id: Meta Pixel will use event_id and event_name for deduplication */
|
|
139
|
-
id: string;
|
|
140
|
-
}[];
|
|
141
|
-
|
|
142
|
-
export type { AdvertisingInfo, AllowedPropertyValues, AppInfo, DeviceInfo, Environment, EnvironmentInfo, EventName, Platform, PlatformInfo, SourceInfo, ThirdPartyTracker, TrackEvent, TrackEventResponse, TrackName, TrackProperties, TrackTags, UTMParams, UserData, UserProvidedData };
|
package/dist/track/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/visitor/types.ts"],"sourcesContent":["import type { UserProperties, UserProvidedData } from '../track/gtag';\nimport type { Environment, Platform } from '../track/types';\n\nexport type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;\n\nexport interface Visitor {\n id: string;\n device_id: string;\n platform: Platform;\n environment: Environment;\n properties: VisitorProperties;\n}\n\nexport interface UpdateVisitorDTO {\n user_id?: string;\n distinct_id?: string;\n data?: UserProvidedData;\n properties?: UserProperties;\n}\n\nexport type ThirdPartyUserSetter = (dto: UpdateVisitorDTO) => void;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/visitor/types.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UserProvidedData, UserProperties } from '../track/gtag.js';
|
|
2
|
-
import { Platform, Environment } from '../track/types.js';
|
|
3
|
-
|
|
4
|
-
type VisitorProperties = Record<Lowercase<string>, string | number | boolean | null>;
|
|
5
|
-
interface Visitor {
|
|
6
|
-
id: string;
|
|
7
|
-
device_id: string;
|
|
8
|
-
platform: Platform;
|
|
9
|
-
environment: Environment;
|
|
10
|
-
properties: VisitorProperties;
|
|
11
|
-
}
|
|
12
|
-
interface UpdateVisitorDTO {
|
|
13
|
-
user_id?: string;
|
|
14
|
-
distinct_id?: string;
|
|
15
|
-
data?: UserProvidedData;
|
|
16
|
-
properties?: UserProperties;
|
|
17
|
-
}
|
|
18
|
-
type ThirdPartyUserSetter = (dto: UpdateVisitorDTO) => void;
|
|
19
|
-
|
|
20
|
-
export type { ThirdPartyUserSetter, UpdateVisitorDTO, Visitor, VisitorProperties };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/web/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Storage } from '../setup/index.js';
|
|
2
|
-
import { TrackTags } from '../track/types.js';
|
|
3
|
-
import '../visitor/types.js';
|
|
4
|
-
import '../track/gtag.js';
|
|
5
|
-
|
|
6
|
-
declare function getDeviceId(): string;
|
|
7
|
-
declare function getTags(): Promise<TrackTags>;
|
|
8
|
-
declare const storage: Storage;
|
|
9
|
-
|
|
10
|
-
export { getDeviceId, getTags, storage };
|