Browser Requirements
Insights is built with modern browser APIs for optimal performance and reliability. The SDK uses ES Modules for loading and the Beacon API for reliable event transmission.
Minimum Browser Versions
| Browser | Minimum Version |
|---|---|
| Chrome | 80+ |
| Firefox | 72+ |
| Safari | 14+ |
| Edge | 80+ |
| Chrome Android | 80+ |
| iOS Safari | 14+ |
| Samsung Internet | 14+ |
Required APIs
The following browser APIs are used by Insights:
| API | Purpose | Fallback |
|---|---|---|
| ES Modules | Script loading | None (required) |
| Beacon API | Reliable event transmission | fetch() with keepalive |
| Intersection Observer | Impression tracking | Disabled if unavailable |
| Fetch API | Token requests, data upload | None (required) |
| localStorage | Token persistence | In-memory (current session only) |
Graceful Degradation
Insights degrades gracefully in environments with limited API support:
- Beacon API unavailable: Falls back to
fetch()with thekeepaliveflag for reliable transmission during page unload - Intersection Observer unavailable: HTML attribute impression tracking is disabled; programmatic tracking via
window.insights.impression()still works - localStorage unavailable: Tokens are stored in memory for the current session only
- Core Web Vitals unavailable: Performance metrics are omitted from page view data
In all cases, core page view and event tracking continue to function. No errors are thrown in unsupported environments.
Script Loading
Insights must be loaded as an ES Module:
<script
type="module"
src="https://insights.thgaltitude.com/sdk/client.js"
data-insights-channel="myprotein"
data-insights-subsite="en"
data-insights-storefront="nutrition"
></script>
The type="module" attribute is required. Without it, the script will not execute.
Next Steps
- Installation - Add the script tag to your application
- Tracking - Set up tracking for your application