·
20 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
@resq-sw/analytics
0.3.0
Minor Changes
-
#62
14ca5d5Thanks @WomB0ComB0! - Add ResQ-specific helpers shared across the three TS surfaces (landing,
research,viz):RESQ_SUBDOMAIN_ALLOWLIST—readonly string[]ofresq.software,
research.resq.software,viz.resq.software. Pass to
AnalyticsConfig.ga4.domainsfor cross-domain linker setup.GA4_ID_PATTERN/sanitizeGa4Id(id)— strict
/^G-[A-Z0-9]{6,32}$/validator that returns the ID when valid or
nullotherwise. Use before interpolating an env-var-sourced GA4 ID
into an inline<script>body — closes CodeQL
js/bad-code-sanitizationand prevents</script>/
line-terminator escapes.resolveResqCookieDomain(host)— returns".resq.software"only
whenhostactually belongs to the registrable root, otherwise
undefined. Use in browser code that reads
window.location.hostnameso preview /localhostdeployments
don't get their cookie rejected with a domain mismatch.
Centralising these means adding a fourth subdomain or tightening the
GA4-ID format becomes a single version bump instead of three
coordinated edits across consumer repos.
0.2.0
Minor Changes
-
#60
98dce28Thanks @WomB0ComB0! - Add@resq-sw/analytics— unified PostHog + GA4 client for the ResQ platform.- Cross-subdomain identity (
resq.software,research.resq.software,viz.resq.software) via shared cookie domain and GA4 linker. - Lazy-loaded
posthog-jsvia dynamic import — zero impact on initial bundle. - Subpath exports:
@resq-sw/analytics,@resq-sw/analytics/react,@resq-sw/analytics/next. - Augmentable
AnalyticsEventsinterface for type-safetrack()calls. withAnalyticsRewrites()Next.js helper for the PostHog reverse-proxy pattern (survives ad-blockers, keeps cookies first-party).
- Cross-subdomain identity (