This commit is contained in:
merelendor 2024-07-18 18:46:26 +03:00
commit 269c21d406
2 changed files with 16 additions and 1 deletions

2
.gitignore vendored
View File

@ -35,3 +35,5 @@ yarn-error.log*
/uploads/*
/.vscode/
start.sh
dev.sh

View File

@ -32,6 +32,19 @@ const WrappedApp = (props) =>
<>
{ !props.observer && (
<>
<Script
src={`https://www.googletagmanager.com/gtag/js?id=${ process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID }`}
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${ process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID }');
`}
</Script>
<Script id="yandex-metrica" strategy={'afterInteractive'}>
{`
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};