We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 210b0d2 commit 00610bbCopy full SHA for 00610bb
docs/.vitepress/theme/index.ts
@@ -17,11 +17,11 @@ export default {
17
}
18
};
19
20
-async function enableAnalytics(router) {
+function enableAnalytics(router) {
21
if (typeof location === "undefined" || location.origin !== "https://observablehq.com") return;
22
- const {pageLoad, routeChanged} = await import("https://events.observablehq.com/client.js?pageLoad");
23
let pageLoaded = false;
24
- watch(router.route, () => {
+ watch(router.route, async () => {
+ const {pageLoad, routeChanged} = await import("https://events.observablehq.com/client.js");
25
if (pageLoaded) {
26
routeChanged();
27
} else {
0 commit comments