diff --git a/.env.example b/.env.example index a81a1918c..8425ee7d6 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ SHOPIFY_REVALIDATION_SECRET= SHOPIFY_STOREFRONT_ACCESS_TOKEN= SHOPIFY_STORE_DOMAIN=shop.narai.jp NEXT_PUBLIC_GTM_ID= + NEXT_PUBLIC_MAILCHIMP_HOST= NEXT_PUBLIC_MAILCHIMP_USER_ID= NEXT_PUBLIC_MAILCHIMP_LIST_ID= diff --git a/.yarn/cache/@types-react-gtm-module-npm-2.0.1-43a55f51a7-cd57eece80.zip b/.yarn/cache/@types-react-gtm-module-npm-2.0.1-43a55f51a7-cd57eece80.zip new file mode 100644 index 000000000..2b2ce79c2 Binary files /dev/null and b/.yarn/cache/@types-react-gtm-module-npm-2.0.1-43a55f51a7-cd57eece80.zip differ diff --git a/.yarn/cache/react-ga-npm-3.3.1-de5c01fc6e-3026976d02.zip b/.yarn/cache/react-ga-npm-3.3.1-de5c01fc6e-3026976d02.zip new file mode 100644 index 000000000..13ea7dc56 Binary files /dev/null and b/.yarn/cache/react-ga-npm-3.3.1-de5c01fc6e-3026976d02.zip differ diff --git a/.yarn/cache/react-gtm-module-npm-2.0.11-99adaedaa9-93b4659f0d.zip b/.yarn/cache/react-gtm-module-npm-2.0.11-99adaedaa9-93b4659f0d.zip new file mode 100644 index 000000000..c978f1612 Binary files /dev/null and b/.yarn/cache/react-gtm-module-npm-2.0.11-99adaedaa9-93b4659f0d.zip differ diff --git a/app/[locale]/about/about-narai-detail.tsx b/app/[locale]/about/about-narai-detail.tsx index 098d19bc6..bdf9d56d8 100644 --- a/app/[locale]/about/about-narai-detail.tsx +++ b/app/[locale]/about/about-narai-detail.tsx @@ -17,8 +17,8 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { return (
-

{t('about.001.title')}

-

{t('about.001.subtitle')}

+

{t('about.001.title')}

+

{t('about.001.subtitle')}

@@ -26,7 +26,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage001} priority={true} alt="A picture of the exterior of the brewery building." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
-

{t('about.002.title')}

+

{t('about.002.title')}

{t('about.002.para001')}

{t('about.002.para002')}

@@ -44,7 +44,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage002} priority={true} alt="A picture of the interior of the brewery building." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
@@ -53,7 +53,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { 'font-multilingual mx-auto flex w-full max-w-3xl flex-col space-y-12 py-24 text-left font-extralight md:py-48' )} > -

{t('about.003.title')}

+

{t('about.003.title')}

{t('about.003.para001')}

@@ -76,7 +76,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { 'font-multilingual mx-auto flex w-full max-w-screen-xl flex-col space-y-12 py-24 text-left font-extralight md:py-48' )} > -
+

{t('about.awards.title')}

{t('about.awards.subtitle')}

@@ -94,7 +94,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { >
-
+

{t('about.materials.title')}

{t('about.materials.subtitle')}

@@ -104,17 +104,19 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage003} priority={true} alt="A picture of the exterior of the brewery building." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
-

- {t('about.materials.water.title')} -

-

- {t('about.materials.water.subtitle')} -

+
+

+ {t('about.materials.water.title')} +

+

+ {t('about.materials.water.subtitle')} +

+

{t('about.materials.water.body')}

@@ -127,17 +129,19 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage004} priority={true} alt="A picture of the rice fields and mountains of Nagano." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
-

- {t('about.materials.rice.title')} -

-

- {t('about.materials.rice.subtitle')} -

+
+

+ {t('about.materials.rice.title')} +

+

+ {t('about.materials.rice.subtitle')} +

+

{t('about.materials.rice.body')}

@@ -150,7 +154,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage005} priority={true} alt="A picture of the interior of the brewery." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
@@ -182,7 +186,7 @@ export default function AboutNaraiDetail({ awards }: { awards: string }) { src={AboutImage006} priority={true} alt="A picture of Irie-san." - className={clsx('h-full w-full object-cover')} + className={clsx('aspect-square h-full w-full object-cover md:aspect-auto')} />
diff --git a/app/[locale]/analytics.tsx b/app/[locale]/analytics.tsx new file mode 100644 index 000000000..5bf3619dd --- /dev/null +++ b/app/[locale]/analytics.tsx @@ -0,0 +1,47 @@ +'use client'; + +import { GTM_ID, pageview } from 'lib/gtm'; +import { usePathname, useSearchParams } from 'next/navigation'; +import Script from 'next/script'; +import { useEffect } from 'react'; + +export default function Analytics() { + const pathname = usePathname(); + const searchParams = useSearchParams(); + + useEffect(() => { + if (pathname) { + pageview(pathname); + } + }, [pathname, searchParams]); + + if (process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production') { + return null; + } + + return ( + <> +