add native and web sdks
This commit is contained in:
15
apps/test/src/pages/_app.tsx
Normal file
15
apps/test/src/pages/_app.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useEffect } from 'react';
|
||||
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.init();
|
||||
return router.events.on('routeChangeComplete', () => {
|
||||
mixan.screenView();
|
||||
});
|
||||
}, []);
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
Reference in New Issue
Block a user