From 6b12621dd8efd86a7080e88ad73eb1a1b7e96fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 19 Dec 2022 16:42:18 +0300 Subject: [PATCH] added ga-analytics --- nuxt.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nuxt.config.js b/nuxt.config.js index 9a470d7d9..c62964f60 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -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'); + ` + } ] } },