From 6882f72625fa8086f15c0aa92e325cfe0bdc7660 Mon Sep 17 00:00:00 2001 From: svix-lucho Date: Tue, 31 Mar 2026 14:55:36 -0300 Subject: [PATCH 1/3] Update Svix play page title --- docs/play.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/play.mdx b/docs/play.mdx index a196706..cef5bb0 100644 --- a/docs/play.mdx +++ b/docs/play.mdx @@ -1,5 +1,5 @@ --- -title: Svix Play - webhook debugger +title: Svix Play - Webhooks Debugger --- You can use the [Svix Play webhook playground and debugger](https://www.svix.com/play/) to easily inspect, test and debug operational webhooks. @@ -175,4 +175,3 @@ curl -X DELETE https://api.play.svix.com/api/v1/history/e_94XdF-OwN3EaTKty4izJDW ``` This will permanently remove all events associated with that token. - From ae0cddcc060b81715e0b9c4d77fd3ecc70fb49b4 Mon Sep 17 00:00:00 2001 From: svix-lucho Date: Tue, 31 Mar 2026 15:14:03 -0300 Subject: [PATCH 2/3] Fix apollo build --- docusaurus.config.js | 5 +++++ src/client-modules/apollo-pixel.js | 19 +++++-------------- static/js/apollo.js | 11 +++++++++++ 3 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 static/js/apollo.js diff --git a/docusaurus.config.js b/docusaurus.config.js index 37e3424..3e38569 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -137,6 +137,11 @@ module.exports = { async: true, defer: true, }, + { + src: "/js/apollo.js", + async: true, + defer: true, + }, { src: "/js/commonroom.js", async: true, diff --git a/src/client-modules/apollo-pixel.js b/src/client-modules/apollo-pixel.js index 043c684..1680eb1 100644 --- a/src/client-modules/apollo-pixel.js +++ b/src/client-modules/apollo-pixel.js @@ -1,23 +1,14 @@ const APOLLO_APP_ID = '66317583955bbd0438bc78c3'; -function loadApolloScript() { - const nocache = Math.random().toString(36).substring(7); - const script = document.createElement('script'); - script.src = `https://assets.apollo.io/micro/website-tracker/tracker.iife.js?nocache=${nocache}`; - script.async = true; - script.defer = true; - script.onload = function () { +function trackApolloPage() { + if (window.trackingFunctions) { + console.log('trackingFunctions', window.trackingFunctions); window.trackingFunctions.onLoad({ appId: APOLLO_APP_ID }); - }; - document.head.appendChild(script); + } } -loadApolloScript(); - export function onRouteDidUpdate({ location, previousLocation }) { if (location.pathname !== previousLocation?.pathname) { - if (window.trackingFunctions) { - window.trackingFunctions.onLoad({ appId: APOLLO_APP_ID }); - } + trackApolloPage(); } } diff --git a/static/js/apollo.js b/static/js/apollo.js new file mode 100644 index 0000000..a5f8926 --- /dev/null +++ b/static/js/apollo.js @@ -0,0 +1,11 @@ +(function () { + var APOLLO_APP_ID = '66317583955bbd0438bc78c3'; + + var script = document.createElement('script'); + script.id = 'apollo-tracker-script'; + script.src = 'https://assets.apollo.io/micro/website-tracker/tracker.iife.js'; + script.async = true; + script.defer = true; + + document.head.appendChild(script); +})(); From a2fbc6803b5e7b1d3108b7a44558777bb705133f Mon Sep 17 00:00:00 2001 From: svix-lucho Date: Tue, 31 Mar 2026 15:58:34 -0300 Subject: [PATCH 3/3] remove consolelog --- src/client-modules/apollo-pixel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client-modules/apollo-pixel.js b/src/client-modules/apollo-pixel.js index 1680eb1..0ddbc5d 100644 --- a/src/client-modules/apollo-pixel.js +++ b/src/client-modules/apollo-pixel.js @@ -2,7 +2,6 @@ const APOLLO_APP_ID = '66317583955bbd0438bc78c3'; function trackApolloPage() { if (window.trackingFunctions) { - console.log('trackingFunctions', window.trackingFunctions); window.trackingFunctions.onLoad({ appId: APOLLO_APP_ID }); } }