added ga-analytics

pull/3426/head
Tuğçe Küçükoğlu 2022-12-19 16:42:18 +03:00
parent c671256f90
commit 6b12621dd8
1 changed files with 17 additions and 0 deletions

View File

@ -40,6 +40,23 @@ export default defineNuxtConfig({
href: baseUrl + 'themes/lara-light-blue/theme.css'
},
{ rel: 'icon', href: baseUrl + 'favicon.ico' }
],
script: [
{
strategy: 'lazyOnload',
src: 'https://www.googletagmanager.com/gtag/js?id=UA-93461466-1'
},
{
id: 'ga-analytics',
strategy: 'lazyOnload',
children: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-93461466-1');
`
}
]
}
},