implement application insights
This commit is contained in:
+4
-1
@@ -8,6 +8,7 @@ import { PersistGate } from "redux-persist/integration/react";
|
||||
import { SessionProvider as AuthProvider } from "next-auth/react";
|
||||
import { Tracking } from "../components/tracking";
|
||||
import { GoogleAnalytics } from "@next/third-parties/google";
|
||||
import Azureappinsights from "../components/azureappinsights";
|
||||
const MyApp = ({ Component, pageProps: { session, ...pageProps } }) => {
|
||||
const store = useStore((state) => state);
|
||||
const persistor = persistStore(store, {}, function () {
|
||||
@@ -21,7 +22,9 @@ const MyApp = ({ Component, pageProps: { session, ...pageProps } }) => {
|
||||
persistor={store.__persistor}
|
||||
loading={<Loading />}
|
||||
>
|
||||
<Component {...pageProps} />
|
||||
<Azureappinsights>
|
||||
<Component {...pageProps} />
|
||||
</Azureappinsights>
|
||||
<GoogleAnalytics gaId="G-GTWW3JT03Z" />
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
|
||||
+3
-3
@@ -42,10 +42,10 @@ class MyDocument extends Document {
|
||||
csp += `form-action 'self' ` + process.env.NEXTAUTH_URL + ` ;`;
|
||||
csp += `object-src 'self' data:;`;
|
||||
csp += `default-src 'self' https://www.google-analytics.com;`;
|
||||
csp += `connect-src 'self' https://region1.google-analytics.com;`;
|
||||
csp += `script-src 'self' 'unsafe-eval' 'unsafe-inline' https://region1.google-analytics.com https://www.google-analytics.com/ https://tagmanager.google.com/ https://www.googletagmanager.com/;`;
|
||||
csp += `connect-src 'self' https://ukwest-0.in.applicationinsights.azure.com https://js.monitor.azure.com https://region1.google-analytics.com;`;
|
||||
csp += `script-src 'self' 'unsafe-eval' 'unsafe-inline' https://ukwest-0.in.applicationinsights.azure.com https://region1.google-analytics.com https://www.google-analytics.com/ https://tagmanager.google.com/ https://www.googletagmanager.com/;`;
|
||||
csp += `style-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://www.google-analytics.com https://tagmanager.google.com/ https://www.googletagmanager.com/ https://fonts.googleapis.com/;`;
|
||||
csp += `img-src 'self' 'unsafe-inline' https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ data:;`;
|
||||
csp += `img-src 'self' 'unsafe-inline' https://www.gov.wales https://gov.wales https://fonts.gstatic.com https://www.googletagmanager.com https://www.google-analytics.com https://ssl.gstatic.com/ data:;`;
|
||||
csp += `font-src 'self' 'unsafe-inline' https://pro.fontawesome.com/ https://fonts.gstatic.com/ data:;`;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user