Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/play.mdx
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.

5 changes: 5 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ module.exports = {
async: true,
defer: true,
},
{
src: "/js/apollo.js",
async: true,
defer: true,
},
{
src: "/js/commonroom.js",
async: true,
Expand Down
19 changes: 5 additions & 14 deletions src/client-modules/apollo-pixel.js
Original file line number Diff line number Diff line change
@@ -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);
Comment thread
svix-lucho marked this conversation as resolved.
Outdated
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();
Comment thread
svix-jbrown marked this conversation as resolved.
}
}
11 changes: 11 additions & 0 deletions static/js/apollo.js
Original file line number Diff line number Diff line change
@@ -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';
Comment thread
svix-jbrown marked this conversation as resolved.
script.async = true;
script.defer = true;

document.head.appendChild(script);
})();
Loading