From bf3097c26ea13f34b4321baf6150cbcb3e11868b Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 19 Mar 2026 13:19:08 +0100 Subject: [PATCH 1/2] fix: invert macOS and PlayStation icons in dark mode Both logos are dark/black and disappear against dark backgrounds. Apply dark:invert CSS filter to flip them to white in dark mode. --- lib/utils/icons.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 {browserName} } +const OS_DARK_INVERT = new Set(['macos', 'playstation']) + const OS_ICON_MAP: Record = { 'windows': 'windows', 'macos': 'macos', @@ -81,7 +83,8 @@ export function getOSIcon(osName: string) { if (!osName) return const file = OS_ICON_MAP[osName.toLowerCase()] if (!file) return - return {osName} + const cls = OS_DARK_INVERT.has(file) ? 'inline-block dark:invert' : 'inline-block' + return {osName} } export function getDeviceIcon(deviceName: string) { -- 2.49.1 From 73fc47e9109da2b5ac9078ee289ba94e91011b78 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 19 Mar 2026 13:45:21 +0100 Subject: [PATCH 2/2] fix: support GTM and tag managers via window.pulseConfig fallback Script detection now also searches by src URL and supports a global config object (window.pulseConfig) for environments where data-* attributes are not preserved on the injected script element. --- lib/integration-guides.tsx | 21 ++++++++++++++++++-- public/script.js | 39 ++++++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 12 deletions(-) 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:

  1. Go to Tags → New → Custom HTML
  2. -
  3. Paste the Pulse script
  4. +
  5. Paste the snippet below (replace your-site.com with your domain)
  6. Set the trigger to All Pages
  7. Publish your container
- {` +`} + +

+ 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. +

+ +
+ + Alternative: inline data attributes (may not work in all GTM setups) + + {``} +

For more details, see the{' '} 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