add analytics for docs
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import type { AppProps } from 'next/app';
|
import type { AppProps } from 'next/app';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
|
import Script from 'next/script';
|
||||||
|
|
||||||
import 'src/globals.css';
|
import 'src/globals.css';
|
||||||
|
|
||||||
@@ -10,6 +11,31 @@ export default function App({ Component, pageProps }: AppProps) {
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
|
<Script
|
||||||
|
src="https://openpanel.dev/op.js"
|
||||||
|
async
|
||||||
|
defer
|
||||||
|
strategy="afterInteractive"
|
||||||
|
/>
|
||||||
|
<Script
|
||||||
|
id="openpanel"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `
|
||||||
|
window.op =
|
||||||
|
window.op ||
|
||||||
|
function (...args) {
|
||||||
|
(window.op.q = window.op.q || []).push(args);
|
||||||
|
};
|
||||||
|
window.op('ctor', {
|
||||||
|
url: 'https://api.openpanel.dev',
|
||||||
|
clientId: 'e884ef1b-52d7-430a-b2c5-69c432faeba4',
|
||||||
|
trackScreenViews: true,
|
||||||
|
trackOutgoingLinks: true,
|
||||||
|
trackAttributes: true,
|
||||||
|
});
|
||||||
|
`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user