diff --git a/lib/integration-guides.tsx b/lib/integration-guides.tsx index 5cfaf17..dd175f7 100644 --- a/lib/integration-guides.tsx +++ b/lib/integration-guides.tsx @@ -2298,15 +2298,32 @@ export default defineConfig({
Follow these steps to add Pulse through GTM:
your-site.com with your domain)
+ This uses a global config object so that GTM does not need to preserve{' '}
+ data-* attributes on the injected script element. You can
+ also pass api, storage, and other options via{' '}
+ pulseConfig.
+
For more details, see the{' '}
diff --git a/lib/utils/icons.tsx b/lib/utils/icons.tsx
index 82a212d..14aee6e 100644
--- a/lib/utils/icons.tsx
+++ b/lib/utils/icons.tsx
@@ -58,6 +58,8 @@ export function getBrowserIcon(browserName: string) {
return
}
+const OS_DARK_INVERT = new Set(['macos', 'playstation'])
+
const OS_ICON_MAP: Record
+ const cls = OS_DARK_INVERT.has(file) ? 'inline-block dark:invert' : 'inline-block'
+ return
}
export function getDeviceIcon(deviceName: string) {
diff --git a/public/script.js b/public/script.js
index 34f078a..1a15f6d 100644
--- a/public/script.js
+++ b/public/script.js
@@ -19,18 +19,37 @@
}
- // * Get domain from script tag
- const script = document.currentScript || document.querySelector('script[data-domain]');
- if (!script || !script.getAttribute('data-domain')) {
+ // * Get config from script tag, or fall back to window.pulseConfig for GTM / tag managers
+ // * GTM Custom HTML tags may not preserve data-* attributes on the injected