@shware/analytics 13.0.4 → 13.1.1
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 +3 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/ads/google.cjs +1 -2
- package/dist/ads/google.d.cts +0 -2
- package/dist/ads/google.d.cts.map +1 -1
- package/dist/ads/google.d.mts +0 -2
- package/dist/ads/google.d.mts.map +1 -1
- package/dist/ads/google.mjs +1 -2
- package/dist/ads/meta.cjs +1 -2
- package/dist/ads/meta.d.cts +0 -2
- package/dist/ads/meta.d.cts.map +1 -1
- package/dist/ads/meta.d.mts +0 -2
- package/dist/ads/meta.d.mts.map +1 -1
- package/dist/ads/meta.mjs +1 -2
- package/dist/ads/time.cjs +1 -2
- package/dist/ads/time.d.cts +0 -2
- package/dist/ads/time.d.cts.map +1 -1
- package/dist/ads/time.d.mts +0 -2
- package/dist/ads/time.d.mts.map +1 -1
- package/dist/ads/time.mjs +1 -2
- package/dist/ads/types.d.cts +0 -2
- package/dist/ads/types.d.cts.map +1 -1
- package/dist/ads/types.d.mts +0 -2
- package/dist/ads/types.d.mts.map +1 -1
- package/dist/attribution/classify.cjs +1 -2
- package/dist/attribution/classify.d.cts +0 -2
- package/dist/attribution/classify.d.cts.map +1 -1
- package/dist/attribution/classify.d.mts +0 -2
- package/dist/attribution/classify.d.mts.map +1 -1
- package/dist/attribution/classify.mjs +1 -2
- package/dist/attribution/vocabulary.cjs +1 -2
- package/dist/attribution/vocabulary.d.cts +0 -2
- package/dist/attribution/vocabulary.d.cts.map +1 -1
- package/dist/attribution/vocabulary.d.mts +0 -2
- package/dist/attribution/vocabulary.d.mts.map +1 -1
- package/dist/attribution/vocabulary.mjs +1 -2
- package/dist/bot/generic.cjs +1 -2
- package/dist/bot/generic.d.cts +0 -2
- package/dist/bot/generic.d.cts.map +1 -1
- package/dist/bot/generic.d.mts +0 -2
- package/dist/bot/generic.d.mts.map +1 -1
- package/dist/bot/generic.mjs +1 -2
- package/dist/bot/index.cjs +1 -2
- package/dist/bot/index.d.cts +0 -2
- package/dist/bot/index.d.cts.map +1 -1
- package/dist/bot/index.d.mts +0 -2
- package/dist/bot/index.d.mts.map +1 -1
- package/dist/bot/index.mjs +1 -2
- package/dist/click-id/index.cjs +1 -2
- package/dist/click-id/index.d.cts +0 -2
- package/dist/click-id/index.d.cts.map +1 -1
- package/dist/click-id/index.d.mts +0 -2
- package/dist/click-id/index.d.mts.map +1 -1
- package/dist/click-id/index.mjs +1 -2
- package/dist/constants/storage.cjs +1 -2
- package/dist/constants/storage.d.cts +0 -2
- package/dist/constants/storage.d.cts.map +1 -1
- package/dist/constants/storage.d.mts +0 -2
- package/dist/constants/storage.d.mts.map +1 -1
- package/dist/constants/storage.mjs +1 -2
- package/dist/feedback/index.cjs +1 -2
- package/dist/feedback/index.d.cts +0 -2
- package/dist/feedback/index.d.cts.map +1 -1
- package/dist/feedback/index.d.mts +0 -2
- package/dist/feedback/index.d.mts.map +1 -1
- package/dist/feedback/index.mjs +1 -2
- package/dist/hooks/use-app-analytics.cjs +1 -2
- package/dist/hooks/use-app-analytics.d.cts +0 -2
- package/dist/hooks/use-app-analytics.d.cts.map +1 -1
- package/dist/hooks/use-app-analytics.d.mts +0 -2
- package/dist/hooks/use-app-analytics.d.mts.map +1 -1
- package/dist/hooks/use-app-analytics.mjs +1 -2
- package/dist/hooks/use-outbound-click-analytics.cjs +1 -2
- package/dist/hooks/use-outbound-click-analytics.d.cts +0 -2
- package/dist/hooks/use-outbound-click-analytics.d.cts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.d.mts +0 -2
- package/dist/hooks/use-outbound-click-analytics.d.mts.map +1 -1
- package/dist/hooks/use-outbound-click-analytics.mjs +1 -2
- package/dist/hooks/use-report-web-vitals.cjs +1 -2
- package/dist/hooks/use-report-web-vitals.d.cts +0 -2
- package/dist/hooks/use-report-web-vitals.d.cts.map +1 -1
- package/dist/hooks/use-report-web-vitals.d.mts +0 -2
- package/dist/hooks/use-report-web-vitals.d.mts.map +1 -1
- package/dist/hooks/use-report-web-vitals.mjs +1 -2
- package/dist/hooks/use-track-impression.cjs +1 -2
- package/dist/hooks/use-track-impression.d.cts +0 -2
- package/dist/hooks/use-track-impression.d.cts.map +1 -1
- package/dist/hooks/use-track-impression.d.mts +0 -2
- package/dist/hooks/use-track-impression.d.mts.map +1 -1
- package/dist/hooks/use-track-impression.mjs +1 -2
- package/dist/hooks/use-uet-id-sync.cjs +1 -2
- package/dist/hooks/use-uet-id-sync.d.cts +0 -2
- package/dist/hooks/use-uet-id-sync.d.cts.map +1 -1
- package/dist/hooks/use-uet-id-sync.d.mts +0 -2
- package/dist/hooks/use-uet-id-sync.d.mts.map +1 -1
- package/dist/hooks/use-uet-id-sync.mjs +1 -2
- package/dist/hooks/use-web-analytics.cjs +1 -2
- package/dist/hooks/use-web-analytics.d.cts +0 -2
- package/dist/hooks/use-web-analytics.d.cts.map +1 -1
- package/dist/hooks/use-web-analytics.d.mts +0 -2
- package/dist/hooks/use-web-analytics.d.mts.map +1 -1
- package/dist/hooks/use-web-analytics.mjs +1 -2
- package/dist/link/index.cjs +1 -2
- package/dist/link/index.d.cts +0 -2
- package/dist/link/index.d.cts.map +1 -1
- package/dist/link/index.d.mts +0 -2
- package/dist/link/index.d.mts.map +1 -1
- package/dist/link/index.mjs +1 -2
- package/dist/native/deep-link.cjs +1 -2
- package/dist/native/deep-link.d.cts +0 -2
- package/dist/native/deep-link.d.cts.map +1 -1
- package/dist/native/deep-link.d.mts +0 -2
- package/dist/native/deep-link.d.mts.map +1 -1
- package/dist/native/deep-link.mjs +1 -2
- package/dist/native/fbsdk.cjs +1 -2
- package/dist/native/fbsdk.d.cts +0 -2
- package/dist/native/fbsdk.d.cts.map +1 -1
- package/dist/native/fbsdk.d.mts +0 -2
- package/dist/native/fbsdk.d.mts.map +1 -1
- package/dist/native/fbsdk.mjs +1 -2
- package/dist/native/fingerprint.cjs +1 -2
- package/dist/native/fingerprint.d.cts +0 -2
- package/dist/native/fingerprint.d.cts.map +1 -1
- package/dist/native/fingerprint.d.mts +0 -2
- package/dist/native/fingerprint.d.mts.map +1 -1
- package/dist/native/fingerprint.mjs +1 -2
- package/dist/native/firebase.cjs +1 -2
- package/dist/native/firebase.d.cts +0 -2
- package/dist/native/firebase.d.cts.map +1 -1
- package/dist/native/firebase.d.mts +0 -2
- package/dist/native/firebase.d.mts.map +1 -1
- package/dist/native/firebase.mjs +1 -2
- package/dist/native/posthog.cjs +1 -2
- package/dist/native/posthog.d.cts +0 -2
- package/dist/native/posthog.d.cts.map +1 -1
- package/dist/native/posthog.d.mts +0 -2
- package/dist/native/posthog.d.mts.map +1 -1
- package/dist/native/posthog.mjs +1 -2
- package/dist/native/setup.cjs +1 -2
- package/dist/native/setup.d.cts +0 -2
- package/dist/native/setup.d.cts.map +1 -1
- package/dist/native/setup.d.mts +0 -2
- package/dist/native/setup.d.mts.map +1 -1
- package/dist/native/setup.mjs +1 -2
- package/dist/next/index.cjs +1 -2
- package/dist/next/index.d.cts +0 -2
- package/dist/next/index.d.cts.map +1 -1
- package/dist/next/index.d.mts +0 -2
- package/dist/next/index.d.mts.map +1 -1
- package/dist/next/index.mjs +1 -2
- package/dist/node_modules/.pnpm/bowser@2.14.1/node_modules/bowser/es5.cjs +1 -2
- package/dist/node_modules/.pnpm/bowser@2.14.1/node_modules/bowser/es5.mjs +1 -2
- package/dist/react-router/index.cjs +1 -2
- package/dist/react-router/index.d.cts +0 -2
- package/dist/react-router/index.d.cts.map +1 -1
- package/dist/react-router/index.d.mts +0 -2
- package/dist/react-router/index.d.mts.map +1 -1
- package/dist/react-router/index.mjs +1 -2
- package/dist/schema/index.cjs +1 -2
- package/dist/schema/index.d.cts +0 -2
- package/dist/schema/index.d.cts.map +1 -1
- package/dist/schema/index.d.mts +0 -2
- package/dist/schema/index.d.mts.map +1 -1
- package/dist/schema/index.mjs +1 -2
- package/dist/server/action-source.cjs +1 -2
- package/dist/server/action-source.d.cts +0 -2
- package/dist/server/action-source.d.cts.map +1 -1
- package/dist/server/action-source.d.mts +0 -2
- package/dist/server/action-source.d.mts.map +1 -1
- package/dist/server/action-source.mjs +1 -2
- package/dist/server/click-ids.cjs +1 -2
- package/dist/server/click-ids.d.cts +0 -2
- package/dist/server/click-ids.d.cts.map +1 -1
- package/dist/server/click-ids.d.mts +0 -2
- package/dist/server/click-ids.d.mts.map +1 -1
- package/dist/server/click-ids.mjs +1 -2
- package/dist/server/google-data-manager.cjs +1 -2
- package/dist/server/google-data-manager.d.cts +0 -2
- package/dist/server/google-data-manager.d.cts.map +1 -1
- package/dist/server/google-data-manager.d.mts +0 -2
- package/dist/server/google-data-manager.d.mts.map +1 -1
- package/dist/server/google-data-manager.mjs +1 -2
- package/dist/server/linkedin-conversions-api.cjs +1 -2
- package/dist/server/linkedin-conversions-api.d.cts +0 -2
- package/dist/server/linkedin-conversions-api.d.cts.map +1 -1
- package/dist/server/linkedin-conversions-api.d.mts +0 -2
- package/dist/server/linkedin-conversions-api.d.mts.map +1 -1
- package/dist/server/linkedin-conversions-api.mjs +1 -2
- package/dist/server/meta-capi.cjs +1 -2
- package/dist/server/meta-capi.d.cts +0 -2
- package/dist/server/meta-capi.d.cts.map +1 -1
- package/dist/server/meta-capi.d.mts +0 -2
- package/dist/server/meta-capi.d.mts.map +1 -1
- package/dist/server/meta-capi.mjs +1 -2
- package/dist/server/meta-conversions-api.cjs +1 -2
- package/dist/server/meta-conversions-api.d.cts +0 -2
- package/dist/server/meta-conversions-api.d.cts.map +1 -1
- package/dist/server/meta-conversions-api.d.mts +0 -2
- package/dist/server/meta-conversions-api.d.mts.map +1 -1
- package/dist/server/meta-conversions-api.mjs +1 -2
- package/dist/server/microsoft-conversions-api.cjs +1 -2
- package/dist/server/microsoft-conversions-api.d.cts +0 -2
- package/dist/server/microsoft-conversions-api.d.cts.map +1 -1
- package/dist/server/microsoft-conversions-api.d.mts +0 -2
- package/dist/server/microsoft-conversions-api.d.mts.map +1 -1
- package/dist/server/microsoft-conversions-api.mjs +1 -2
- package/dist/server/openai-conversions-api.cjs +1 -2
- package/dist/server/openai-conversions-api.d.cts +0 -2
- package/dist/server/openai-conversions-api.d.cts.map +1 -1
- package/dist/server/openai-conversions-api.d.mts +0 -2
- package/dist/server/openai-conversions-api.d.mts.map +1 -1
- package/dist/server/openai-conversions-api.mjs +1 -2
- package/dist/server/page-location.cjs +1 -2
- package/dist/server/page-location.d.cts +0 -2
- package/dist/server/page-location.d.cts.map +1 -1
- package/dist/server/page-location.d.mts +0 -2
- package/dist/server/page-location.d.mts.map +1 -1
- package/dist/server/page-location.mjs +1 -2
- package/dist/server/reddit-conversions-api.cjs +1 -2
- package/dist/server/reddit-conversions-api.d.cts +0 -2
- package/dist/server/reddit-conversions-api.d.cts.map +1 -1
- package/dist/server/reddit-conversions-api.d.mts +0 -2
- package/dist/server/reddit-conversions-api.d.mts.map +1 -1
- package/dist/server/reddit-conversions-api.mjs +1 -2
- package/dist/setup/index.cjs +1 -2
- package/dist/setup/index.d.cts +0 -2
- package/dist/setup/index.d.cts.map +1 -1
- package/dist/setup/index.d.mts +0 -2
- package/dist/setup/index.d.mts.map +1 -1
- package/dist/setup/index.mjs +1 -2
- package/dist/setup/session.cjs +1 -2
- package/dist/setup/session.d.cts +0 -2
- package/dist/setup/session.d.cts.map +1 -1
- package/dist/setup/session.d.mts +0 -2
- package/dist/setup/session.d.mts.map +1 -1
- package/dist/setup/session.mjs +1 -2
- package/dist/tanstack/analytics.cjs +1 -2
- package/dist/tanstack/analytics.d.cts +0 -2
- package/dist/tanstack/analytics.d.cts.map +1 -1
- package/dist/tanstack/analytics.d.mts +0 -2
- package/dist/tanstack/analytics.d.mts.map +1 -1
- package/dist/tanstack/analytics.mjs +1 -2
- package/dist/tanstack/middleware.cjs +1 -2
- package/dist/tanstack/middleware.d.cts +0 -2
- package/dist/tanstack/middleware.d.cts.map +1 -1
- package/dist/tanstack/middleware.d.mts +0 -2
- package/dist/tanstack/middleware.d.mts.map +1 -1
- package/dist/tanstack/middleware.mjs +1 -2
- package/dist/test/native-modules.d.cts +0 -2
- package/dist/test/native-modules.d.mts +0 -2
- package/dist/test/setup.cjs +1 -2
- package/dist/test/setup.d.cts +0 -2
- package/dist/test/setup.d.cts.map +1 -1
- package/dist/test/setup.d.mts +0 -2
- package/dist/test/setup.d.mts.map +1 -1
- package/dist/test/setup.mjs +1 -2
- package/dist/third-parties/google-analytics.cjs +2 -3
- package/dist/third-parties/google-analytics.cjs.map +1 -1
- package/dist/third-parties/google-analytics.d.cts +0 -2
- package/dist/third-parties/google-analytics.d.cts.map +1 -1
- package/dist/third-parties/google-analytics.d.mts +0 -2
- package/dist/third-parties/google-analytics.d.mts.map +1 -1
- package/dist/third-parties/google-analytics.mjs +2 -3
- package/dist/third-parties/google-analytics.mjs.map +1 -1
- package/dist/third-parties/ignored-events.cjs +1 -2
- package/dist/third-parties/ignored-events.d.cts +0 -2
- package/dist/third-parties/ignored-events.d.cts.map +1 -1
- package/dist/third-parties/ignored-events.d.mts +0 -2
- package/dist/third-parties/ignored-events.d.mts.map +1 -1
- package/dist/third-parties/ignored-events.mjs +1 -2
- package/dist/third-parties/linkedin-insight-tag.cjs +1 -2
- package/dist/third-parties/linkedin-insight-tag.d.cts +0 -2
- package/dist/third-parties/linkedin-insight-tag.d.cts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.d.mts +0 -2
- package/dist/third-parties/linkedin-insight-tag.d.mts.map +1 -1
- package/dist/third-parties/linkedin-insight-tag.mjs +1 -2
- package/dist/third-parties/meta-pixel.cjs +1 -2
- package/dist/third-parties/meta-pixel.d.cts +0 -2
- package/dist/third-parties/meta-pixel.d.cts.map +1 -1
- package/dist/third-parties/meta-pixel.d.mts +0 -2
- package/dist/third-parties/meta-pixel.d.mts.map +1 -1
- package/dist/third-parties/meta-pixel.mjs +1 -2
- package/dist/third-parties/microsoft-uet.cjs +1 -2
- package/dist/third-parties/microsoft-uet.d.cts +0 -2
- package/dist/third-parties/microsoft-uet.d.cts.map +1 -1
- package/dist/third-parties/microsoft-uet.d.mts +0 -2
- package/dist/third-parties/microsoft-uet.d.mts.map +1 -1
- package/dist/third-parties/microsoft-uet.mjs +1 -2
- package/dist/third-parties/openai-pixel.cjs +1 -2
- package/dist/third-parties/openai-pixel.d.cts +0 -2
- package/dist/third-parties/openai-pixel.d.cts.map +1 -1
- package/dist/third-parties/openai-pixel.d.mts +0 -2
- package/dist/third-parties/openai-pixel.d.mts.map +1 -1
- package/dist/third-parties/openai-pixel.mjs +1 -2
- package/dist/third-parties/posthog.cjs +8 -4
- package/dist/third-parties/posthog.cjs.map +1 -1
- package/dist/third-parties/posthog.d.cts +3 -2
- package/dist/third-parties/posthog.d.cts.map +1 -1
- package/dist/third-parties/posthog.d.mts +3 -2
- package/dist/third-parties/posthog.d.mts.map +1 -1
- package/dist/third-parties/posthog.mjs +8 -4
- package/dist/third-parties/posthog.mjs.map +1 -1
- package/dist/third-parties/reddit-pixel.cjs +1 -2
- package/dist/third-parties/reddit-pixel.d.cts +0 -2
- package/dist/third-parties/reddit-pixel.d.cts.map +1 -1
- package/dist/third-parties/reddit-pixel.d.mts +0 -2
- package/dist/third-parties/reddit-pixel.d.mts.map +1 -1
- package/dist/third-parties/reddit-pixel.mjs +1 -2
- package/dist/track/fbq.cjs +1 -2
- package/dist/track/fbq.d.cts +0 -2
- package/dist/track/fbq.d.cts.map +1 -1
- package/dist/track/fbq.d.mts +0 -2
- package/dist/track/fbq.d.mts.map +1 -1
- package/dist/track/fbq.mjs +1 -2
- package/dist/track/gtag.cjs +1 -2
- package/dist/track/gtag.cjs.map +1 -1
- package/dist/track/gtag.d.cts +2 -4
- package/dist/track/gtag.d.cts.map +1 -1
- package/dist/track/gtag.d.mts +2 -4
- package/dist/track/gtag.d.mts.map +1 -1
- package/dist/track/gtag.mjs +1 -2
- package/dist/track/gtag.mjs.map +1 -1
- package/dist/track/index.cjs +5 -3
- package/dist/track/index.cjs.map +1 -1
- package/dist/track/index.d.cts +6 -4
- package/dist/track/index.d.cts.map +1 -1
- package/dist/track/index.d.mts +6 -4
- package/dist/track/index.d.mts.map +1 -1
- package/dist/track/index.mjs +5 -3
- package/dist/track/index.mjs.map +1 -1
- package/dist/track/lintrk.d.cts +0 -2
- package/dist/track/lintrk.d.cts.map +1 -1
- package/dist/track/lintrk.d.mts +0 -2
- package/dist/track/lintrk.d.mts.map +1 -1
- package/dist/track/oaiq.cjs +1 -2
- package/dist/track/oaiq.d.cts +0 -2
- package/dist/track/oaiq.d.cts.map +1 -1
- package/dist/track/oaiq.d.mts +0 -2
- package/dist/track/oaiq.d.mts.map +1 -1
- package/dist/track/oaiq.mjs +1 -2
- package/dist/track/once.cjs +12 -3
- package/dist/track/once.cjs.map +1 -1
- package/dist/track/once.d.cts +7 -3
- package/dist/track/once.d.cts.map +1 -1
- package/dist/track/once.d.mts +7 -3
- package/dist/track/once.d.mts.map +1 -1
- package/dist/track/once.mjs +12 -3
- package/dist/track/once.mjs.map +1 -1
- package/dist/track/rdt.cjs +1 -2
- package/dist/track/rdt.d.cts +0 -2
- package/dist/track/rdt.d.cts.map +1 -1
- package/dist/track/rdt.d.mts +0 -2
- package/dist/track/rdt.d.mts.map +1 -1
- package/dist/track/rdt.mjs +1 -2
- package/dist/track/types.d.cts +0 -2
- package/dist/track/types.d.cts.map +1 -1
- package/dist/track/types.d.mts +0 -2
- package/dist/track/types.d.mts.map +1 -1
- package/dist/track/uetq.cjs +1 -2
- package/dist/track/uetq.d.cts +0 -2
- package/dist/track/uetq.d.cts.map +1 -1
- package/dist/track/uetq.d.mts +0 -2
- package/dist/track/uetq.d.mts.map +1 -1
- package/dist/track/uetq.mjs +1 -2
- package/dist/utils/field.cjs +1 -2
- package/dist/utils/field.d.cts +0 -2
- package/dist/utils/field.d.cts.map +1 -1
- package/dist/utils/field.d.mts +0 -2
- package/dist/utils/field.d.mts.map +1 -1
- package/dist/utils/field.mjs +1 -2
- package/dist/utils/redact-url.cjs +1 -2
- package/dist/utils/redact-url.d.cts +0 -2
- package/dist/utils/redact-url.d.cts.map +1 -1
- package/dist/utils/redact-url.d.mts +0 -2
- package/dist/utils/redact-url.d.mts.map +1 -1
- package/dist/utils/redact-url.mjs +1 -2
- package/dist/utils/sha256.cjs +1 -2
- package/dist/utils/sha256.d.cts +0 -2
- package/dist/utils/sha256.d.cts.map +1 -1
- package/dist/utils/sha256.d.mts +0 -2
- package/dist/utils/sha256.d.mts.map +1 -1
- package/dist/utils/sha256.mjs +1 -2
- package/dist/visitor/id.cjs +1 -2
- package/dist/visitor/id.cjs.map +1 -1
- package/dist/visitor/id.d.cts +0 -2
- package/dist/visitor/id.d.cts.map +1 -1
- package/dist/visitor/id.d.mts +0 -2
- package/dist/visitor/id.d.mts.map +1 -1
- package/dist/visitor/id.mjs +1 -2
- package/dist/visitor/id.mjs.map +1 -1
- package/dist/visitor/index.cjs +14 -6
- package/dist/visitor/index.cjs.map +1 -1
- package/dist/visitor/index.d.cts +6 -3
- package/dist/visitor/index.d.cts.map +1 -1
- package/dist/visitor/index.d.mts +6 -3
- package/dist/visitor/index.d.mts.map +1 -1
- package/dist/visitor/index.mjs +14 -6
- package/dist/visitor/index.mjs.map +1 -1
- package/dist/visitor/types.d.cts +0 -2
- package/dist/visitor/types.d.cts.map +1 -1
- package/dist/visitor/types.d.mts +0 -2
- package/dist/visitor/types.d.mts.map +1 -1
- package/dist/web/index.cjs +1 -2
- package/dist/web/index.d.cts +0 -2
- package/dist/web/index.d.cts.map +1 -1
- package/dist/web/index.d.mts +0 -2
- package/dist/web/index.d.mts.map +1 -1
- package/dist/web/index.mjs +1 -2
- package/dist/web/page-key.cjs +1 -2
- package/dist/web/page-key.d.cts +0 -2
- package/dist/web/page-key.d.cts.map +1 -1
- package/dist/web/page-key.d.mts +0 -2
- package/dist/web/page-key.d.mts.map +1 -1
- package/dist/web/page-key.mjs +1 -2
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/server/page-location.ts
|
|
3
3
|
/**
|
|
4
4
|
* The URL an event happened on, whichever name the client that sent it used.
|
|
5
5
|
*
|
|
@@ -16,7 +16,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
16
16
|
function pageLocation(tags) {
|
|
17
17
|
return tags.page_location ?? tags.source_url;
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.pageLocation = pageLocation;
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=page-location.cjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TrackTags } from "../track/types.cjs";
|
|
2
|
-
//#region src/server/page-location.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The URL an event happened on, whichever name the client that sent it used.
|
|
5
4
|
*
|
|
@@ -14,5 +13,4 @@ import { TrackTags } from "../track/types.cjs";
|
|
|
14
13
|
* a month of cache lifetime is the usual bound, and stored rows can be checked for it.
|
|
15
14
|
*/
|
|
16
15
|
export declare function pageLocation(tags: TrackTags): string | undefined;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=page-location.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-location.d.cts","names":[],"sources":["../../src/server/page-location.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"page-location.d.cts","names":[],"sources":["../../src/server/page-location.ts"],"mappings":";;;;;;;;;;;;;;wBAegB,aAAa,MAAM"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TrackTags } from "../track/types.mjs";
|
|
2
|
-
//#region src/server/page-location.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The URL an event happened on, whichever name the client that sent it used.
|
|
5
4
|
*
|
|
@@ -14,5 +13,4 @@ import { TrackTags } from "../track/types.mjs";
|
|
|
14
13
|
* a month of cache lifetime is the usual bound, and stored rows can be checked for it.
|
|
15
14
|
*/
|
|
16
15
|
export declare function pageLocation(tags: TrackTags): string | undefined;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=page-location.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-location.d.mts","names":[],"sources":["../../src/server/page-location.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"page-location.d.mts","names":[],"sources":["../../src/server/page-location.ts"],"mappings":";;;;;;;;;;;;;;wBAegB,aAAa,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/server/page-location.ts
|
|
2
2
|
/**
|
|
3
3
|
* The URL an event happened on, whichever name the client that sent it used.
|
|
4
4
|
*
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
function pageLocation(tags) {
|
|
16
16
|
return tags.page_location ?? tags.source_url;
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { pageLocation };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=page-location.mjs.map
|
|
@@ -6,7 +6,7 @@ const require_server_click_ids = require("./click-ids.cjs");
|
|
|
6
6
|
const require_server_page_location = require("./page-location.cjs");
|
|
7
7
|
const require_track_rdt = require("../track/rdt.cjs");
|
|
8
8
|
let _shware_utils = require("@shware/utils");
|
|
9
|
-
|
|
9
|
+
// src/server/reddit-conversions-api.ts
|
|
10
10
|
function getServerEvent(event, data, actionSource) {
|
|
11
11
|
const { id, name, properties, tags, platform, created_at } = event;
|
|
12
12
|
const [type, params] = require_track_rdt.mapRDTEvent(name, properties, id);
|
|
@@ -70,7 +70,6 @@ async function sendEvents(accessToken, pixelId, events, data = {}, testId, actio
|
|
|
70
70
|
console.error("Failed to send Reddit conversion, network error:", error);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
//#endregion
|
|
74
73
|
exports.getServerEvent = getServerEvent;
|
|
75
74
|
exports.sendEvents = sendEvents;
|
|
76
75
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TrackEvent, UserProvidedData } from "../track/types.cjs";
|
|
2
2
|
import { ServerStandardEvent } from "../track/rdt.cjs";
|
|
3
3
|
import { EventActionSource } from "./action-source.cjs";
|
|
4
|
-
//#region src/server/reddit-conversions-api.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* https://ads-api.reddit.com/docs/v3/operations/Post%20Conversion%20Events
|
|
7
6
|
* https://business.reddithelp.com/s/article/map-a-catalog-to-a-signal-source
|
|
@@ -80,5 +79,4 @@ export interface CreateRedditEventDTO {
|
|
|
80
79
|
}
|
|
81
80
|
export declare function getServerEvent(event: TrackEvent<any>, data: UserProvidedData, actionSource?: EventActionSource): RedditEvent;
|
|
82
81
|
export declare function sendEvents(accessToken: string, pixelId: string, events: TrackEvent<any>[], data?: UserProvidedData, testId?: string, actionSource?: EventActionSource): Promise<void>;
|
|
83
|
-
//#endregion
|
|
84
82
|
//# sourceMappingURL=reddit-conversions-api.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reddit-conversions-api.d.cts","names":[],"sources":["../../src/server/reddit-conversions-api.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reddit-conversions-api.d.cts","names":[],"sources":["../../src/server/reddit-conversions-api.ts"],"mappings":";;;;;;;iBAaiB;;EAEf;;EAGA;;;;;EAMA;;;;;EAMA;EAEA;IACE,eAAe;IACf;;;;;;;EAQF;IACE;IACA;IACA;IACA;IACA;MAAa;MAAY;MAAe;;;EAG1C;IACE;IACA;IACA;IACA;IACA;;IAGA;;IAGA;;;;;;IAMA;IAEA;MAAsB;MAAe;;;;;;IAMrC;MACE;MACA;MACA;;;;iBAKW;EACf;IAAQ;IAAkB,QAAQ;;;wBAGpB,eAEd,OAAO,iBACP,MAAM,kBACN,eAAe,oBACd;wBAoDmB,WACpB,qBACA,iBAEA,QAAQ,mBACR,OAAM,kBACN,iBACA,eAAe,oBAAiB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TrackEvent, UserProvidedData } from "../track/types.mjs";
|
|
2
2
|
import { ServerStandardEvent } from "../track/rdt.mjs";
|
|
3
3
|
import { EventActionSource } from "./action-source.mjs";
|
|
4
|
-
//#region src/server/reddit-conversions-api.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* https://ads-api.reddit.com/docs/v3/operations/Post%20Conversion%20Events
|
|
7
6
|
* https://business.reddithelp.com/s/article/map-a-catalog-to-a-signal-source
|
|
@@ -80,5 +79,4 @@ export interface CreateRedditEventDTO {
|
|
|
80
79
|
}
|
|
81
80
|
export declare function getServerEvent(event: TrackEvent<any>, data: UserProvidedData, actionSource?: EventActionSource): RedditEvent;
|
|
82
81
|
export declare function sendEvents(accessToken: string, pixelId: string, events: TrackEvent<any>[], data?: UserProvidedData, testId?: string, actionSource?: EventActionSource): Promise<void>;
|
|
83
|
-
//#endregion
|
|
84
82
|
//# sourceMappingURL=reddit-conversions-api.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reddit-conversions-api.d.mts","names":[],"sources":["../../src/server/reddit-conversions-api.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reddit-conversions-api.d.mts","names":[],"sources":["../../src/server/reddit-conversions-api.ts"],"mappings":";;;;;;;iBAaiB;;EAEf;;EAGA;;;;;EAMA;;;;;EAMA;EAEA;IACE,eAAe;IACf;;;;;;;EAQF;IACE;IACA;IACA;IACA;IACA;MAAa;MAAY;MAAe;;;EAG1C;IACE;IACA;IACA;IACA;IACA;;IAGA;;IAGA;;;;;;IAMA;IAEA;MAAsB;MAAe;;;;;;IAMrC;MACE;MACA;MACA;;;;iBAKW;EACf;IAAQ;IAAkB,QAAQ;;;wBAGpB,eAEd,OAAO,iBACP,MAAM,kBACN,eAAe,oBACd;wBAoDmB,WACpB,qBACA,iBAEA,QAAQ,mBACR,OAAM,kBACN,iBACA,eAAe,oBAAiB"}
|
|
@@ -5,7 +5,7 @@ import { redditClickId, redditUuid } from "./click-ids.mjs";
|
|
|
5
5
|
import { pageLocation } from "./page-location.mjs";
|
|
6
6
|
import { mapRDTEvent, mapServerStandardEvent } from "../track/rdt.mjs";
|
|
7
7
|
import { fetch } from "@shware/utils";
|
|
8
|
-
|
|
8
|
+
// src/server/reddit-conversions-api.ts
|
|
9
9
|
function getServerEvent(event, data, actionSource) {
|
|
10
10
|
const { id, name, properties, tags, platform, created_at } = event;
|
|
11
11
|
const [type, params] = mapRDTEvent(name, properties, id);
|
|
@@ -69,7 +69,6 @@ async function sendEvents(accessToken, pixelId, events, data = {}, testId, actio
|
|
|
69
69
|
console.error("Failed to send Reddit conversion, network error:", error);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { getServerEvent, sendEvents };
|
|
74
73
|
|
|
75
74
|
//# sourceMappingURL=reddit-conversions-api.mjs.map
|
package/dist/setup/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/setup/index.ts
|
|
3
3
|
const cache = { tags: null };
|
|
4
4
|
const config = {
|
|
5
5
|
endpoint: "",
|
|
@@ -35,7 +35,6 @@ function setupAnalytics(init) {
|
|
|
35
35
|
console.error("analytics deepLink.listen failed", error);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
exports.cache = cache;
|
|
40
39
|
exports.config = config;
|
|
41
40
|
exports.setupAnalytics = setupAnalytics;
|
package/dist/setup/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Environment, Platform, ThirdPartyTracker, TrackTags } from "../track/types.cjs";
|
|
2
2
|
import { ThirdPartyUserSetter } from "../visitor/types.cjs";
|
|
3
|
-
//#region src/setup/index.d.ts
|
|
4
3
|
export interface Storage {
|
|
5
4
|
getItem: (key: string) => string | null;
|
|
6
5
|
setItem: (key: string, value: string) => void;
|
|
@@ -49,6 +48,5 @@ interface Cache {
|
|
|
49
48
|
export declare const cache: Cache;
|
|
50
49
|
export declare const config: Config;
|
|
51
50
|
export declare function setupAnalytics(init: Options): void;
|
|
52
|
-
//#endregion
|
|
53
51
|
export {};
|
|
54
52
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/setup/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/setup/index.ts"],"mappings":";;iBAGiB;EACf,UAAU;EACV,UAAU,aAAa;;;;;;;iBAQR;;EAEf;;EAEA,eAAe,YAAY,QAAQ;;iBAGpB;EACf;EACA,SAAS;EACT;EACA,UAAU;EACV,aAAa;EACb,eAAe,YAAY,QAAQ;EACnC,4BAA4B;EAC5B,mBAAmB,yBAAyB,QAAQ;EACpD,qBAAqB;EACrB,wBAAwB;;EAExB,WAAW;;UAGH;EACR;EACA;EACA,SAAS;EACT,UAAU;EACV,aAAa;EACb,eAAe,YAAY,QAAQ;EACnC,4BAA4B;EAC5B,kBAAkB,yBAAyB,QAAQ;EACnD,oBAAoB;EACpB,uBAAuB;EACvB,UAAU;;UAGF;EACR,MAAM;;qBAGK,OAAO;qBAKP,QAAQ;wBAeL,eAAe,MAAM"}
|
package/dist/setup/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Environment, Platform, ThirdPartyTracker, TrackTags } from "../track/types.mjs";
|
|
2
2
|
import { ThirdPartyUserSetter } from "../visitor/types.mjs";
|
|
3
|
-
//#region src/setup/index.d.ts
|
|
4
3
|
export interface Storage {
|
|
5
4
|
getItem: (key: string) => string | null;
|
|
6
5
|
setItem: (key: string, value: string) => void;
|
|
@@ -49,6 +48,5 @@ interface Cache {
|
|
|
49
48
|
export declare const cache: Cache;
|
|
50
49
|
export declare const config: Config;
|
|
51
50
|
export declare function setupAnalytics(init: Options): void;
|
|
52
|
-
//#endregion
|
|
53
51
|
export {};
|
|
54
52
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/setup/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/setup/index.ts"],"mappings":";;iBAGiB;EACf,UAAU;EACV,UAAU,aAAa;;;;;;;iBAQR;;EAEf;;EAEA,eAAe,YAAY,QAAQ;;iBAGpB;EACf;EACA,SAAS;EACT;EACA,UAAU;EACV,aAAa;EACb,eAAe,YAAY,QAAQ;EACnC,4BAA4B;EAC5B,mBAAmB,yBAAyB,QAAQ;EACpD,qBAAqB;EACrB,wBAAwB;;EAExB,WAAW;;UAGH;EACR;EACA;EACA,SAAS;EACT,UAAU;EACV,aAAa;EACb,eAAe,YAAY,QAAQ;EACnC,4BAA4B;EAC5B,kBAAkB,yBAAyB,QAAQ;EACnD,oBAAoB;EACpB,uBAAuB;EACvB,UAAU;;UAGF;EACR,MAAM;;qBAGK,OAAO;qBAKP,QAAQ;wBAeL,eAAe,MAAM"}
|
package/dist/setup/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/setup/index.ts
|
|
2
2
|
const cache = { tags: null };
|
|
3
3
|
const config = {
|
|
4
4
|
endpoint: "",
|
|
@@ -34,7 +34,6 @@ function setupAnalytics(init) {
|
|
|
34
34
|
console.error("analytics deepLink.listen failed", error);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
//#endregion
|
|
38
37
|
export { cache, config, setupAnalytics };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=index.mjs.map
|
package/dist/setup/session.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_setup_index = require("./index.cjs");
|
|
3
3
|
const require_constants_storage = require("../constants/storage.cjs");
|
|
4
4
|
let uuid = require("uuid");
|
|
5
|
-
|
|
5
|
+
// src/setup/session.ts
|
|
6
6
|
const SESSION_TIMEOUT = 18e5;
|
|
7
7
|
/**
|
|
8
8
|
* `<version>.<id>.<lastEventTime>`, compact and cookie-safe rather than JSON: `{`, `"`
|
|
@@ -138,7 +138,6 @@ let session;
|
|
|
138
138
|
function getSession() {
|
|
139
139
|
return session ??= new Session();
|
|
140
140
|
}
|
|
141
|
-
//#endregion
|
|
142
141
|
exports.SESSION_TIMEOUT = SESSION_TIMEOUT;
|
|
143
142
|
exports.getSession = getSession;
|
|
144
143
|
|
package/dist/setup/session.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/setup/session.d.ts
|
|
2
1
|
export declare const SESSION_TIMEOUT: number;
|
|
3
2
|
/** The session an event belongs to, and whether that event is the one that started it. */
|
|
4
3
|
interface SessionForEvent {
|
|
@@ -70,6 +69,5 @@ declare class Session {
|
|
|
70
69
|
* visitor across every request the isolate serves. Import it there; do not track.
|
|
71
70
|
*/
|
|
72
71
|
export declare function getSession(): Session;
|
|
73
|
-
//#endregion
|
|
74
72
|
export {};
|
|
75
73
|
//# sourceMappingURL=session.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.cts","names":[],"sources":["../../src/setup/session.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.cts","names":[],"sources":["../../src/setup/session.ts"],"mappings":"A,qBAIa;;UAiBH;EACR;EACA;;cA8BI;;;;;;;;;UASI;UACA;UAEA;UACA;UACA;EAER;;;;;;;EAeA,QAAK,mBAAqB,2BAA8B;;;;;;;;EA6BxD;EAWA;EAEA,eAAY;EAIZ;EAWA;EAKA;EAKA;EAKA;EAKA,mBAAgB,OAAW;EAK3B;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkCc,cAAU"}
|
package/dist/setup/session.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/setup/session.d.ts
|
|
2
1
|
export declare const SESSION_TIMEOUT: number;
|
|
3
2
|
/** The session an event belongs to, and whether that event is the one that started it. */
|
|
4
3
|
interface SessionForEvent {
|
|
@@ -70,6 +69,5 @@ declare class Session {
|
|
|
70
69
|
* visitor across every request the isolate serves. Import it there; do not track.
|
|
71
70
|
*/
|
|
72
71
|
export declare function getSession(): Session;
|
|
73
|
-
//#endregion
|
|
74
72
|
export {};
|
|
75
73
|
//# sourceMappingURL=session.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.mts","names":[],"sources":["../../src/setup/session.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.mts","names":[],"sources":["../../src/setup/session.ts"],"mappings":"A,qBAIa;;UAiBH;EACR;EACA;;cA8BI;;;;;;;;;UASI;UACA;UAEA;UACA;UACA;EAER;;;;;;;EAeA,QAAK,mBAAqB,2BAA8B;;;;;;;;EA6BxD;EAWA;EAEA,eAAY;EAIZ;EAWA;EAKA;EAKA;EAKA;EAKA,mBAAgB,OAAW;EAK3B;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkCc,cAAU"}
|
package/dist/setup/session.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { config } from "./index.mjs";
|
|
2
2
|
import { keys } from "../constants/storage.mjs";
|
|
3
3
|
import { v7 } from "uuid";
|
|
4
|
-
|
|
4
|
+
// src/setup/session.ts
|
|
5
5
|
const SESSION_TIMEOUT = 18e5;
|
|
6
6
|
/**
|
|
7
7
|
* `<version>.<id>.<lastEventTime>`, compact and cookie-safe rather than JSON: `{`, `"`
|
|
@@ -137,7 +137,6 @@ let session;
|
|
|
137
137
|
function getSession() {
|
|
138
138
|
return session ??= new Session();
|
|
139
139
|
}
|
|
140
|
-
//#endregion
|
|
141
140
|
export { SESSION_TIMEOUT, getSession };
|
|
142
141
|
|
|
143
142
|
//# sourceMappingURL=session.mjs.map
|
|
@@ -6,7 +6,7 @@ const require_hooks_use_uet_id_sync = require("../hooks/use-uet-id-sync.cjs");
|
|
|
6
6
|
const require_hooks_use_web_analytics = require("../hooks/use-web-analytics.cjs");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let _tanstack_react_router = require("@tanstack/react-router");
|
|
9
|
-
|
|
9
|
+
// src/tanstack/analytics.tsx
|
|
10
10
|
function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, uetConsent = { ad_storage: "granted" }, hotjarId, facebookAppId, reportWebVitals = true }) {
|
|
11
11
|
const { pathname, searchStr } = (0, _tanstack_react_router.useLocation)();
|
|
12
12
|
require_hooks_use_web_analytics.useWebAnalytics(pathname, searchStr);
|
|
@@ -179,7 +179,6 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId,
|
|
|
179
179
|
})
|
|
180
180
|
] });
|
|
181
181
|
}
|
|
182
|
-
//#endregion
|
|
183
182
|
exports.Analytics = Analytics;
|
|
184
183
|
|
|
185
184
|
//# sourceMappingURL=analytics.cjs.map
|
|
@@ -2,7 +2,6 @@ import { GaId } from "../track/gtag.cjs";
|
|
|
2
2
|
import { PixelId } from "../track/fbq.cjs";
|
|
3
3
|
import { PixelId as PixelId$1 } from "../track/rdt.cjs";
|
|
4
4
|
import { UETConsent } from "../track/uetq.cjs";
|
|
5
|
-
//#region src/tanstack/analytics.d.ts
|
|
6
5
|
interface Props {
|
|
7
6
|
gaId?: GaId;
|
|
8
7
|
gaSrc?: string;
|
|
@@ -30,6 +29,5 @@ interface Props {
|
|
|
30
29
|
reportWebVitals?: boolean;
|
|
31
30
|
}
|
|
32
31
|
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, uetConsent, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
32
|
export {};
|
|
35
33
|
//# sourceMappingURL=analytics.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.cts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/tanstack/analytics.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.cts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/tanstack/analytics.tsx"],"mappings":";;;;UAWU;EACR,OAAO;EACP;EACA,cAAcA;EACd;EACA,gBAAgBC;EAChB;;EAEA;;EAEA;;;;;;;;;EASA,aAAa;EACb;EACA;EACA;EACA;EACA;;wBAGc,YACd,MACA,OACA,OACA,WACA,aACA,eACA,eACA,mBACA,UACA,eACA,YACA,UACA,eACA,mBACC,wBAAK,IAAA"}
|
|
@@ -2,7 +2,6 @@ import { GaId } from "../track/gtag.mjs";
|
|
|
2
2
|
import { PixelId } from "../track/fbq.mjs";
|
|
3
3
|
import { PixelId as PixelId$1 } from "../track/rdt.mjs";
|
|
4
4
|
import { UETConsent } from "../track/uetq.mjs";
|
|
5
|
-
//#region src/tanstack/analytics.d.ts
|
|
6
5
|
interface Props {
|
|
7
6
|
gaId?: GaId;
|
|
8
7
|
gaSrc?: string;
|
|
@@ -30,6 +29,5 @@ interface Props {
|
|
|
30
29
|
reportWebVitals?: boolean;
|
|
31
30
|
}
|
|
32
31
|
export declare function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, uetConsent, hotjarId, facebookAppId, reportWebVitals }: Props): import("react").JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
32
|
export {};
|
|
35
33
|
//# sourceMappingURL=analytics.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.mts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/tanstack/analytics.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"analytics.d.mts","names":["MetaPixelId","RedditPixelId"],"sources":["../../src/tanstack/analytics.tsx"],"mappings":";;;;UAWU;EACR,OAAO;EACP;EACA,cAAcA;EACd;EACA,gBAAgBC;EAChB;;EAEA;;EAEA;;;;;;;;;EASA,aAAa;EACb;EACA;EACA;EACA;EACA;;wBAGc,YACd,MACA,OACA,OACA,WACA,aACA,eACA,eACA,mBACA,UACA,eACA,YACA,UACA,eACA,mBACC,wBAAK,IAAA"}
|
|
@@ -5,7 +5,7 @@ import { useUETIdSync } from "../hooks/use-uet-id-sync.mjs";
|
|
|
5
5
|
import { useWebAnalytics } from "../hooks/use-web-analytics.mjs";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useLocation } from "@tanstack/react-router";
|
|
8
|
-
|
|
8
|
+
// src/tanstack/analytics.tsx
|
|
9
9
|
function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId, redditPixelId, linkedInPartnerId, uetTagId, uetCustomerId, uetConsent = { ad_storage: "granted" }, hotjarId, facebookAppId, reportWebVitals = true }) {
|
|
10
10
|
const { pathname, searchStr } = useLocation();
|
|
11
11
|
useWebAnalytics(pathname, searchStr);
|
|
@@ -178,7 +178,6 @@ function Analytics({ gaId, gaSrc, nonce, debugMode, metaPixelId, openaiPixelId,
|
|
|
178
178
|
})
|
|
179
179
|
] });
|
|
180
180
|
}
|
|
181
|
-
//#endregion
|
|
182
181
|
export { Analytics };
|
|
183
182
|
|
|
184
183
|
//# sourceMappingURL=analytics.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_click_id_index = require("../click-id/index.cjs");
|
|
3
3
|
let _tanstack_react_start = require("@tanstack/react-start");
|
|
4
|
-
|
|
4
|
+
// src/tanstack/middleware.ts
|
|
5
5
|
/**
|
|
6
6
|
* Whether a response could be stored by a shared cache (a CDN) under its `Cache-Control`. One
|
|
7
7
|
* that is `private` or `no-store` already cannot, so a per-user `Set-Cookie` on it is safe as it
|
|
@@ -60,7 +60,6 @@ function createClickIdMiddleware(options) {
|
|
|
60
60
|
return result;
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
//#endregion
|
|
64
63
|
exports.createClickIdMiddleware = createClickIdMiddleware;
|
|
65
64
|
|
|
66
65
|
//# sourceMappingURL=middleware.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/tanstack/middleware.d.ts
|
|
2
1
|
export interface ClickIdMiddlewareOptions {
|
|
3
2
|
/**
|
|
4
3
|
* `Domain` attribute for the cookies: the site's registrable domain, e.g. `.shware.io`, where the
|
|
@@ -59,5 +58,4 @@ export interface ClickIdMiddlewareOptions {
|
|
|
59
58
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc
|
|
60
59
|
*/
|
|
61
60
|
export declare function createClickIdMiddleware(options: ClickIdMiddlewareOptions): import("@tanstack/react-start").RequestMiddlewareAfterServer<{}, undefined, undefined>;
|
|
62
|
-
//#endregion
|
|
63
61
|
//# sourceMappingURL=middleware.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.cts","names":[],"sources":["../../src/tanstack/middleware.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"middleware.d.cts","names":[],"sources":["../../src/tanstack/middleware.ts"],"mappings":"A,iBAGiB;;;;;;EAMf;;EAEA;;EAEA;;;;;;;;;EASA;;;;;;;;EAQA;;;;;EAKA,iBAAiB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDZ,wBAAwB,SAAS,2DAAwB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/tanstack/middleware.d.ts
|
|
2
1
|
export interface ClickIdMiddlewareOptions {
|
|
3
2
|
/**
|
|
4
3
|
* `Domain` attribute for the cookies: the site's registrable domain, e.g. `.shware.io`, where the
|
|
@@ -59,5 +58,4 @@ export interface ClickIdMiddlewareOptions {
|
|
|
59
58
|
* reference: https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc
|
|
60
59
|
*/
|
|
61
60
|
export declare function createClickIdMiddleware(options: ClickIdMiddlewareOptions): import("@tanstack/react-start").RequestMiddlewareAfterServer<{}, undefined, undefined>;
|
|
62
|
-
//#endregion
|
|
63
61
|
//# sourceMappingURL=middleware.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.mts","names":[],"sources":["../../src/tanstack/middleware.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"middleware.d.mts","names":[],"sources":["../../src/tanstack/middleware.ts"],"mappings":"A,iBAGiB;;;;;;EAMf;;EAEA;;EAEA;;;;;;;;;EASA;;;;;;;;EAQA;;;;;EAKA,iBAAiB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgDZ,wBAAwB,SAAS,2DAAwB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveClickIdCookies, toSetCookieHeaders } from "../click-id/index.mjs";
|
|
2
2
|
import { createMiddleware } from "@tanstack/react-start";
|
|
3
|
-
|
|
3
|
+
// src/tanstack/middleware.ts
|
|
4
4
|
/**
|
|
5
5
|
* Whether a response could be stored by a shared cache (a CDN) under its `Cache-Control`. One
|
|
6
6
|
* that is `private` or `no-store` already cannot, so a per-user `Set-Cookie` on it is safe as it
|
|
@@ -59,7 +59,6 @@ function createClickIdMiddleware(options) {
|
|
|
59
59
|
return result;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { createClickIdMiddleware };
|
|
64
63
|
|
|
65
64
|
//# sourceMappingURL=middleware.mjs.map
|
package/dist/test/setup.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/test/setup.ts
|
|
3
3
|
/**
|
|
4
4
|
* The SDK's state — `config`, `cache`, the session singleton, the track queue — lives in module
|
|
5
5
|
* scope, exactly as it does in a browser. Tests therefore load the modules fresh per test with
|
|
@@ -44,7 +44,6 @@ function textRequestBody(init) {
|
|
|
44
44
|
if (typeof init?.body !== "string") throw new Error("Expected a text request body");
|
|
45
45
|
return init.body;
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
exports.baseOptions = baseOptions;
|
|
49
48
|
exports.jsonResponse = jsonResponse;
|
|
50
49
|
exports.memoryStorage = memoryStorage;
|
package/dist/test/setup.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Options } from "../setup/index.cjs";
|
|
2
|
-
//#region src/test/setup.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The SDK's state — `config`, `cache`, the session singleton, the track queue — lives in module
|
|
5
4
|
* scope, exactly as it does in a browser. Tests therefore load the modules fresh per test with
|
|
@@ -18,5 +17,4 @@ export declare function jsonResponse(data: unknown, status?: number): Response;
|
|
|
18
17
|
export declare function requestUrl(input: Parameters<typeof globalThis.fetch>[0]): string;
|
|
19
18
|
/** These transports serialize JSON to a text body; an absent or binary body is a test failure. */
|
|
20
19
|
export declare function textRequestBody(init: RequestInit | undefined): string;
|
|
21
|
-
//#endregion
|
|
22
20
|
//# sourceMappingURL=setup.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.cts","names":[],"sources":["../../src/test/setup.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.cts","names":[],"sources":["../../src/test/setup.ts"],"mappings":";;;;;;;wBASgB,cAAc,OAAM;;EAIjB,UAAA;EACA,UAAA,aAAM;;wBAMT,YAAY,YAAW,QAAQ,WAAgB;;wBAc/C,aAAa,eAAe,kBAAY;;wBAQxC,WAAW,OAAO,kBAAkB,WAAW;;wBAK/C,gBAAgB,MAAM"}
|
package/dist/test/setup.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Options } from "../setup/index.mjs";
|
|
2
|
-
//#region src/test/setup.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The SDK's state — `config`, `cache`, the session singleton, the track queue — lives in module
|
|
5
4
|
* scope, exactly as it does in a browser. Tests therefore load the modules fresh per test with
|
|
@@ -18,5 +17,4 @@ export declare function jsonResponse(data: unknown, status?: number): Response;
|
|
|
18
17
|
export declare function requestUrl(input: Parameters<typeof globalThis.fetch>[0]): string;
|
|
19
18
|
/** These transports serialize JSON to a text body; an absent or binary body is a test failure. */
|
|
20
19
|
export declare function textRequestBody(init: RequestInit | undefined): string;
|
|
21
|
-
//#endregion
|
|
22
20
|
//# sourceMappingURL=setup.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.mts","names":[],"sources":["../../src/test/setup.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.mts","names":[],"sources":["../../src/test/setup.ts"],"mappings":";;;;;;;wBASgB,cAAc,OAAM;;EAIjB,UAAA;EACA,UAAA,aAAM;;wBAMT,YAAY,YAAW,QAAQ,WAAgB;;wBAc/C,aAAa,eAAe,kBAAY;;wBAQxC,WAAW,OAAO,kBAAkB,WAAW;;wBAK/C,gBAAgB,MAAM"}
|
package/dist/test/setup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/test/setup.ts
|
|
2
2
|
/**
|
|
3
3
|
* The SDK's state — `config`, `cache`, the session singleton, the track queue — lives in module
|
|
4
4
|
* scope, exactly as it does in a browser. Tests therefore load the modules fresh per test with
|
|
@@ -43,7 +43,6 @@ function textRequestBody(init) {
|
|
|
43
43
|
if (typeof init?.body !== "string") throw new Error("Expected a text request body");
|
|
44
44
|
return init.body;
|
|
45
45
|
}
|
|
46
|
-
//#endregion
|
|
47
46
|
export { baseOptions, jsonResponse, memoryStorage, requestUrl, textRequestBody };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=setup.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/third-parties/google-analytics.ts
|
|
3
3
|
function sendGAEvent(name, properties) {
|
|
4
4
|
if (typeof window === "undefined" || !window.gtag) {
|
|
5
5
|
console.warn("GA has not been initialized");
|
|
@@ -12,10 +12,9 @@ function setGAUser({ user_id, user_data }) {
|
|
|
12
12
|
console.warn("GA has not been initialized");
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
window.gtag("set", "user_id", user_id || null);
|
|
16
16
|
if (user_data) window.gtag("set", "user_data", user_data);
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
exports.sendGAEvent = sendGAEvent;
|
|
20
19
|
exports.setGAUser = setGAUser;
|
|
21
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-analytics.cjs","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"sourcesContent":["import type { UpdateVisitorDTO } from '../schema/index';\nimport type { Gtag } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\ndeclare global {\n interface Window {\n /** Undefined until the Google tag (gtag.js) script has loaded. */\n gtag?: Gtag['gtag'];\n }\n}\n\nexport function sendGAEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return false;\n }\n window.gtag('event', name, properties);\n}\n\nexport function setGAUser({ user_id, user_data }: UpdateVisitorDTO) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return;\n }\n
|
|
1
|
+
{"version":3,"file":"google-analytics.cjs","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"sourcesContent":["import type { UpdateVisitorDTO } from '../schema/index';\nimport type { Gtag } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\ndeclare global {\n interface Window {\n /** Undefined until the Google tag (gtag.js) script has loaded. */\n gtag?: Gtag['gtag'];\n }\n}\n\nexport function sendGAEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return false;\n }\n window.gtag('event', name, properties);\n}\n\nexport function setGAUser({ user_id, user_data }: UpdateVisitorDTO) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return;\n }\n // No user is sign-out (`setVisitor({})`): GA keeps a set user_id for every later event on the\n // page, so it is cleared explicitly.\n window.gtag('set', 'user_id', user_id || null);\n if (user_data) window.gtag('set', 'user_data', user_data);\n}\n"],"mappings":";;AAWA,SAAgB,YACd,MACA,YACA;CACA,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,MAAM;EACjD,QAAQ,KAAK,6BAA6B;EAC1C,OAAO;CACT;CACA,OAAO,KAAK,SAAS,MAAM,UAAU;AACvC;AAEA,SAAgB,UAAU,EAAE,SAAS,aAA+B;CAClE,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,MAAM;EACjD,QAAQ,KAAK,6BAA6B;EAC1C;CACF;CAGA,OAAO,KAAK,OAAO,WAAW,WAAW,IAAI;CAC7C,IAAI,WAAW,OAAO,KAAK,OAAO,aAAa,SAAS;AAC1D"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Gtag } from "../track/gtag.cjs";
|
|
2
2
|
import { EventName, TrackName, TrackProperties } from "../track/types.cjs";
|
|
3
3
|
import { UpdateVisitorDTO } from "../schema/index.cjs";
|
|
4
|
-
//#region src/third-parties/google-analytics.d.ts
|
|
5
4
|
declare global {
|
|
6
5
|
interface Window {
|
|
7
6
|
/** Undefined until the Google tag (gtag.js) script has loaded. */
|
|
@@ -10,5 +9,4 @@ declare global {
|
|
|
10
9
|
}
|
|
11
10
|
export declare function sendGAEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): false | undefined;
|
|
12
11
|
export declare function setGAUser({ user_id, user_data }: UpdateVisitorDTO): void;
|
|
13
|
-
//#endregion
|
|
14
12
|
//# sourceMappingURL=google-analytics.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-analytics.d.cts","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-analytics.d.cts","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"mappings":";;;QAIQ;YACI;;IAER,OAAO;;;wBAIK,YAAY,UAAU,WACpC,MAAM,UAAU,IAChB,aAAa,gBAAgB;wBASf,YAAY,SAAS,aAAa"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Gtag } from "../track/gtag.mjs";
|
|
2
2
|
import { EventName, TrackName, TrackProperties } from "../track/types.mjs";
|
|
3
3
|
import { UpdateVisitorDTO } from "../schema/index.mjs";
|
|
4
|
-
//#region src/third-parties/google-analytics.d.ts
|
|
5
4
|
declare global {
|
|
6
5
|
interface Window {
|
|
7
6
|
/** Undefined until the Google tag (gtag.js) script has loaded. */
|
|
@@ -10,5 +9,4 @@ declare global {
|
|
|
10
9
|
}
|
|
11
10
|
export declare function sendGAEvent<T extends EventName>(name: TrackName<T>, properties?: TrackProperties<T>): false | undefined;
|
|
12
11
|
export declare function setGAUser({ user_id, user_data }: UpdateVisitorDTO): void;
|
|
13
|
-
//#endregion
|
|
14
12
|
//# sourceMappingURL=google-analytics.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-analytics.d.mts","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-analytics.d.mts","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"mappings":";;;QAIQ;YACI;;IAER,OAAO;;;wBAIK,YAAY,UAAU,WACpC,MAAM,UAAU,IAChB,aAAa,gBAAgB;wBASf,YAAY,SAAS,aAAa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/third-parties/google-analytics.ts
|
|
2
2
|
function sendGAEvent(name, properties) {
|
|
3
3
|
if (typeof window === "undefined" || !window.gtag) {
|
|
4
4
|
console.warn("GA has not been initialized");
|
|
@@ -11,10 +11,9 @@ function setGAUser({ user_id, user_data }) {
|
|
|
11
11
|
console.warn("GA has not been initialized");
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
window.gtag("set", "user_id", user_id || null);
|
|
15
15
|
if (user_data) window.gtag("set", "user_data", user_data);
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { sendGAEvent, setGAUser };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=google-analytics.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-analytics.mjs","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"sourcesContent":["import type { UpdateVisitorDTO } from '../schema/index';\nimport type { Gtag } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\ndeclare global {\n interface Window {\n /** Undefined until the Google tag (gtag.js) script has loaded. */\n gtag?: Gtag['gtag'];\n }\n}\n\nexport function sendGAEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return false;\n }\n window.gtag('event', name, properties);\n}\n\nexport function setGAUser({ user_id, user_data }: UpdateVisitorDTO) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return;\n }\n
|
|
1
|
+
{"version":3,"file":"google-analytics.mjs","names":[],"sources":["../../src/third-parties/google-analytics.ts"],"sourcesContent":["import type { UpdateVisitorDTO } from '../schema/index';\nimport type { Gtag } from '../track/gtag';\nimport type { EventName, TrackName, TrackProperties } from '../track/types';\n\ndeclare global {\n interface Window {\n /** Undefined until the Google tag (gtag.js) script has loaded. */\n gtag?: Gtag['gtag'];\n }\n}\n\nexport function sendGAEvent<T extends EventName>(\n name: TrackName<T>,\n properties?: TrackProperties<T>\n) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return false;\n }\n window.gtag('event', name, properties);\n}\n\nexport function setGAUser({ user_id, user_data }: UpdateVisitorDTO) {\n if (typeof window === 'undefined' || !window.gtag) {\n console.warn('GA has not been initialized');\n return;\n }\n // No user is sign-out (`setVisitor({})`): GA keeps a set user_id for every later event on the\n // page, so it is cleared explicitly.\n window.gtag('set', 'user_id', user_id || null);\n if (user_data) window.gtag('set', 'user_data', user_data);\n}\n"],"mappings":";AAWA,SAAgB,YACd,MACA,YACA;CACA,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,MAAM;EACjD,QAAQ,KAAK,6BAA6B;EAC1C,OAAO;CACT;CACA,OAAO,KAAK,SAAS,MAAM,UAAU;AACvC;AAEA,SAAgB,UAAU,EAAE,SAAS,aAA+B;CAClE,IAAI,OAAO,WAAW,eAAe,CAAC,OAAO,MAAM;EACjD,QAAQ,KAAK,6BAA6B;EAC1C;CACF;CAGA,OAAO,KAAK,OAAO,WAAW,WAAW,IAAI;CAC7C,IAAI,WAAW,OAAO,KAAK,OAAO,aAAa,SAAS;AAC1D"}
|