File tree Expand file tree Collapse file tree 11 files changed +88
-50
lines changed
Expand file tree Collapse file tree 11 files changed +88
-50
lines changed Original file line number Diff line number Diff line change 4444 else
4545 echo "NEXT_PUBLIC_FRONT_URL=$STAGING_PUBLIC_FRONT_URL" >> $GITHUB_ENV
4646 fi
47+ echo "NEXT_PUBLIC_GTM_ID=${{ secrets.GTM_ID }}" >> $GITHUB_ENV
4748 - name : Build Docker images
4849 uses : docker/bake-action@v5
4950 env :
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ COPY --link . .
4545ARG WORDPRESS_API_URL
4646# https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser
4747ARG NEXT_PUBLIC_FRONT_URL
48+ ARG NEXT_PUBLIC_GTM_ID
4849
4950RUN pnpm install --frozen-lockfile --offline --prod && \
5051 pnpm run build
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export default function Contact() {
4848 </ p >
4949
5050 < div className = "text-orange font-bold text-3xl mt-2" >
51- 06 82 96 38 89
51+ < a href = "tel:06Je c82963889" > 06 82 96 38 89</ a >
5252 </ div >
5353 < div className = "text-sm" > du lundi au samedi de 09h à 18h</ div >
5454 </ div >
Original file line number Diff line number Diff line change 1+ import { GoogleTagManager } from '@next/third-parties/google'
12import { ReactNode } from 'react'
23
34import Footer from '@layout/Footer'
@@ -60,6 +61,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
6061 }
6162 return (
6263 < html lang = "fr" >
64+ < GoogleTagManager gtmId = { process . env . NEXT_PUBLIC_GTM_ID ! } />
6365 < head />
6466 < body >
6567 < script
Original file line number Diff line number Diff line change 33import React from 'react'
44
55import { useForm } from 'react-hook-form'
6+ import { sendGTMEvent } from '@next/third-parties/google'
67
78import Button from '@component/Button'
89import { useFormState } from '@hook/useFormState'
@@ -37,6 +38,13 @@ export default function ContactForm({ lg = false }: { lg?: boolean }) {
3738 . then ( ( ) => {
3839 success ( )
3940 reset ( )
41+
42+ sendGTMEvent ( {
43+ event : 'contact_form_submit' ,
44+ form_location : window . location . pathname ,
45+ form_source : document . referrer || 'direct'
46+ } )
47+
4048 fetch ( '/api/hello-slack' , {
4149 method : 'POST' ,
4250 body : JSON . stringify ( data ) ,
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export default function Footer() {
107107 < span className = "button" > Demandez un devis</ span >
108108 </ Link >
109109 < div className = "my-2 text-3xl font-bold text-orange" >
110- 06 82 96 38 89
110+ < a href = "tel:0682963889" > 06 82 96 38 89</ a >
111111 </ div >
112112 < div className = "text-center md:text-right text-sm" >
113113 SIRET : 813 430 592 00010
Original file line number Diff line number Diff line change 1- import { ReactNode , useCallback , useState } from 'react'
2-
31import Image from 'next/image'
2+ import { ReactNode , useCallback , useState } from 'react'
3+ import { sendGTMEvent } from '@next/third-parties/google'
44import { usePathname } from 'next/navigation'
55import { useWindowSize } from 'react-use'
66
@@ -315,7 +315,10 @@ export default function NavPrimary({ isSticky = false }: Props) {
315315 />
316316 < Link href = { RouteLink . contact } >
317317 < span
318- onClick = { ( ) => setOpen ( false ) }
318+ onClick = { ( ) => {
319+ sendGTMEvent ( { event : 'contact' , position : 'header' } )
320+ setOpen ( false )
321+ } }
319322 className = "mt-2 lg:mt-0 inline-flex py-1 px-2 bg-orange uppercase text-gray-darker font-medium"
320323 >
321324 Contactez-moi
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ services:
77 args :
88 NEXT_PUBLIC_FRONT_URL : ${NEXT_PUBLIC_FRONT_URL}
99 WORDPRESS_API_URL : ${WORDPRESS_API_URL}
10+ NEXT_PUBLIC_GTM_ID : ${NEXT_PUBLIC_GTM_ID}
1011 environment :
1112 WORDPRESS_API_URL : ${WORDPRESS_API_URL}
1213 healthcheck :
Original file line number Diff line number Diff line change 11/// <reference types="next" />
22/// <reference types="next/image-types/global" />
3+ /// <reference path="./.next/types/routes.d.ts" />
34
45// NOTE: This file should not be edited
56// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Original file line number Diff line number Diff line change 1616 "@mdx-js/loader" : " ^3.1.1" ,
1717 "@mdx-js/react" : " ^3.1.1" ,
1818 "@next/mdx" : " ^15.5.3" ,
19+ "@next/third-parties" : " ^15.5.3" ,
1920 "@tailwindcss/typography" : " ^0.5.16" ,
2021 "@types/mdx" : " ^2.0.13" ,
2122 "@types/prismjs" : " ^1.26.5" ,
2728 "gsap" : " ^3.13.0" ,
2829 "moment" : " ^2.30.1" ,
2930 "motion" : " ^12.23.12" ,
30- "next" : " 15.4.7 " ,
31+ "next" : " 15.5.3 " ,
3132 "next-sitemap" : " ^4.2.3" ,
3233 "postcss" : " ^8.5.6" ,
3334 "prismjs" : " ^1.30.0" ,
You can’t perform that action at this time.
0 commit comments