Skip to content

Commit 580ce0a

Browse files
committed
www(исправление бага): fix ga
fix ga
1 parent f33ce79 commit 580ce0a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

www/analytics/google-analytics.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import Script from "next/script";
44
export const GoogleAnalytics:FC = () => {
55
return (
66
<>
7-
<Script src="https://www.googletagmanager.com/gtag/js?id=G-K2BJ26CT7F" strategy="afterInteractive" />
87
<Script id="google-analytics" strategy="afterInteractive">
98
{`
109
window.dataLayer = window.dataLayer || [];
1110
function gtag(){window.dataLayer.push(arguments);}
1211
gtag('js', new Date());
13-
12+
console.log('GGGGGGGGGG')
1413
gtag('config', 'G-K2BJ26CT7F');
1514
`}
1615
</Script>
16+
<Script src="https://www.googletagmanager.com/gtag/js?id=G-K2BJ26CT7F" strategy="afterInteractive" />
1717
</>
1818
)
1919
}

www/layout/base-layout/base-app-layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {createSharedStore, SharedStoreContext} from "../../stores/shared-store";
55
import {useLocalObservable} from "mobx-react-lite";
66
import Head from "next/head";
77
import { YMInitializer } from "react-yandex-metrika";
8+
import { GoogleAnalytics } from "../../analytics/google-analytics";
89

910

1011
const BaseAppLayout: FC = ({children}) => {
@@ -15,6 +16,7 @@ const BaseAppLayout: FC = ({children}) => {
1516
<SharedStoreContext.Provider value={sharedStore}>
1617

1718
<div className="base-layout">
19+
<GoogleAnalytics/>
1820
<YMInitializer accounts={[51846272]} />
1921
<AppHeader></AppHeader>
2022
{children}

www/pages/_app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ function MyApp({ Component, pageProps }: AppProps) {
1515
return (
1616
<BaseAppLayout>
1717
<Head>
18-
<GoogleAnalytics/>
1918
<MetaMultiDescription title={ appConfig.title } description={ appConfig.description }/>
2019
<meta name="yandex-verification" content="d7555ce264b8a099"/>
2120
<meta name="viewport"

0 commit comments

Comments
 (0)