From 219a3d6d5b26370c9b4ad354aff37511a96ba883 Mon Sep 17 00:00:00 2001 From: Bryant Gillespie Date: Wed, 14 Aug 2024 14:30:03 -0400 Subject: [PATCH 1/2] oops GTM - come back (#163) --- nuxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index bdfbc5e7..358d6d39 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -60,7 +60,7 @@ export default defineNuxtConfig({ '@nuxtjs/sitemap', // https://sitemap.nuxtjs.org/usage/sitemap 'nuxt-og-image', 'floating-vue/nuxt', - // '@zadigetvoltaire/nuxt-gtm', + '@zadigetvoltaire/nuxt-gtm', 'nuxt-schema-org', '@nuxtjs/fontaine', '@formkit/auto-animate/nuxt', From df62e27c5fbbec0208a7046ec0bf53615d201a83 Mon Sep 17 00:00:00 2001 From: Bryant Gillespie Date: Mon, 19 Aug 2024 10:04:09 -0400 Subject: [PATCH 2/2] fix types (#165) --- modules/posthog/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/posthog/index.ts b/modules/posthog/index.ts index 6f5d12d7..44b584c5 100644 --- a/modules/posthog/index.ts +++ b/modules/posthog/index.ts @@ -49,6 +49,8 @@ export interface ModuleOptions { disabled?: boolean; } +type PosthogRuntimeConfig = Required; + export default defineNuxtModule({ meta: { name: 'nuxt-posthog', @@ -64,14 +66,14 @@ export default defineNuxtModule({ const { resolve } = createResolver(import.meta.url); // Public runtimeConfig - nuxt.options.runtimeConfig.public.posthog = defu( + nuxt.options.runtimeConfig.public.posthog = defu( nuxt.options.runtimeConfig.public.posthog, { publicKey: options.publicKey, host: options.host, - capturePageViews: options.capturePageViews, - clientOptions: options.clientOptions, - disabled: options.disabled, + capturePageViews: options.capturePageViews ?? true, + clientOptions: options.clientOptions ?? {}, + disabled: options.disabled ?? false, }, );