fix: auto-detect domain from hostname for zero-config GTM support #65

Merged
uz1mani merged 2 commits from staging into main 2026-03-19 12:59:05 +00:00

2 Commits

Author SHA1 Message Date
Usman Baig
e6d840abb9 docs: simplify GTM integration guide for auto-detect domain 2026-03-19 13:58:09 +01:00
Usman Baig
ac9e10b436 fix: auto-detect domain from hostname for zero-config GTM support
When data-domain attribute and pulseConfig are both unavailable (common
with GTM which strips data-* attributes), the script now falls back to
location.hostname. This is safe because the backend already validates
Origin/Referer against the registered domain. Strips www. prefix on
auto-detected hostname to match typical Pulse registration patterns.
2026-03-19 13:56:18 +01:00