fix sdk api
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { useEffect } from 'react';
|
||||
import { mixan } from '@/analytics';
|
||||
// import { mixan } from '@/analytics';
|
||||
import type { AppProps } from 'next/app';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export default function MyApp({ Component, pageProps }: AppProps) {
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
mixan.screenView();
|
||||
return router.events.on('routeChangeComplete', () => {
|
||||
mixan.screenView();
|
||||
});
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// mixan.screenView();
|
||||
// return router.events.on('routeChangeComplete', () => {
|
||||
// mixan.screenView();
|
||||
// });
|
||||
// }, []);
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
21
apps/test/src/pages/_document.tsx
Normal file
21
apps/test/src/pages/_document.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Head, Html, Main, NextScript } from 'next/document';
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
<script
|
||||
async
|
||||
src="/cdn.global.js"
|
||||
client-id="568b4ed1-5d00-4f27-88a7-b8959e6674bd"
|
||||
client-secret="1e362905-d352-44c4-9263-e037a2ad52fb"
|
||||
track-screen-views="true"
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user