File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
examples/with-google-tag-manager/app Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
- ' use client'
1
+ " use client" ;
2
2
3
- import { sendGTMEvent } from ' @next/third-parties/google'
3
+ import { sendGTMEvent } from " @next/third-parties/google" ;
4
4
5
5
export function EventButton ( ) {
6
6
return (
7
7
< div >
8
8
< button
9
- onClick = { ( ) => sendGTMEvent ( { event : ' buttonClicked' , value : ' xyz' } ) }
9
+ onClick = { ( ) => sendGTMEvent ( { event : " buttonClicked" , value : " xyz" } ) }
10
10
>
11
11
Send Event
12
12
</ button >
13
13
</ div >
14
- )
14
+ ) ;
15
15
}
Original file line number Diff line number Diff line change 1
- import { GoogleTagManager } from ' @next/third-parties/google'
1
+ import { GoogleTagManager } from " @next/third-parties/google" ;
2
2
3
- const GTM_ID = process . env . NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID
3
+ const GTM_ID = process . env . NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID ;
4
4
5
5
export default function RootLayout ( { children } ) {
6
6
return (
7
7
< html lang = "en" >
8
8
< body > { children } </ body >
9
9
< GoogleTagManager gtmId = { GTM_ID } />
10
10
</ html >
11
- )
11
+ ) ;
12
12
}
Original file line number Diff line number Diff line change 1
- import { EventButton } from ' ./components/EventButton'
1
+ import { EventButton } from " ./components/EventButton" ;
2
2
3
3
export default function Page ( ) {
4
4
return (
5
5
< div >
6
6
< EventButton />
7
7
</ div >
8
- )
8
+ ) ;
9
9
}
You can’t perform that action at this time.
0 commit comments