Add Google Analytics to layouts

This commit is contained in:
Sam Carlton 2022-06-12 11:40:55 -05:00
parent 30afc37346
commit 036ca92438
2 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import '~/assets/css/tailwind.css'
import { PageHead } from '~/helpers/config-node.js' import { PageHead } from '~/helpers/config-node.js'
import VueBaseLayout from '../../layouts/base.vue' import VueBaseLayout from '../../layouts/base.vue'
import GoogleAnalytics from '~/src/components/google-analytics.astro'
const { const {
// headTitle, // headTitle,
@ -25,6 +26,9 @@ const pageHead = new PageHead({
<head> <head>
<title>{ pageHead.title }</title> <title>{ pageHead.title }</title>
<Fragment set:html={ pageHead.metaAndLinkMarkup } /> <Fragment set:html={ pageHead.metaAndLinkMarkup } />
<GoogleAnalytics />
</head> </head>
<body> <body>
<VueBaseLayout <VueBaseLayout

View file

@ -3,7 +3,7 @@ import '~/assets/css/tailwind.css'
import { PageHead } from '~/helpers/config-node.js' import { PageHead } from '~/helpers/config-node.js'
import VueBaseLayout from '../../layouts/base.vue' import GoogleAnalytics from '~/src/components/google-analytics.astro'
const { const {
// headTitle, // headTitle,
@ -25,6 +25,8 @@ const pageHead = new PageHead({
<head> <head>
<title>{ pageHead.title }</title> <title>{ pageHead.title }</title>
<Fragment set:html={ pageHead.metaAndLinkMarkup } /> <Fragment set:html={ pageHead.metaAndLinkMarkup } />
<GoogleAnalytics />
</head> </head>
<body> <body>
<slot /> <slot />