Skip to content

Commit

Permalink
fix: wrong domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
daief committed Nov 13, 2021
1 parent 66face3 commit 54dcc40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docs/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@ export const createApp = ViteSSG(
app.component('Playground', Playground);
app.component('MarkdownTable', MarkdownTable);
app.use(daisyui as any);

router.afterEach((to, from) => {
if (!isClient) return;
if (to.path !== from.path) {
try {
(window as any).gtag.trackPath(to.path);
} catch (error) {}
}
});
},
);
4 changes: 1 addition & 3 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ const config: UserConfig = {
transformIndexHtml: (html) => {
return html.replace(
'<!-- __GOOGLE_GA__ -->',
isDev
? ''
: '<script src="https://daief/def-common/js/ga.js"></script>',
isDev ? '' : '<script src="/def-common/js/ga.js"></script>',
);
},
},
Expand Down

0 comments on commit 54dcc40

Please sign in to comment.