@@ -17,15 +17,18 @@ import styles from "@/pages/SelectStylePage/SelectStylePage.module.scss";
1717
1818import { useCreateReviewStore } from "@/store/useReviewStore" ;
1919
20+ import { gTagLogEvent } from "@/utils/gtag" ;
21+
2022interface StyleProps {
2123 name : string ;
2224 image : string ;
25+ tagId : string ;
2326}
2427
2528const IMG_STYLE_DATA = [
26- { name : "친근한 말투" , image : "/assets/img/img-style-friendly.webp" } ,
27- { name : "믿음직한 말투" , image : "/assets/img/img-style-trust.webp" } ,
28- { name : "귀여운 말투" , image : "/assets/img/img-style-cute.webp" } ,
29+ { name : "친근한 말투" , image : "/assets/img/img-style-friendly.webp" , tagId : "friendly_button" } ,
30+ { name : "믿음직한 말투" , image : "/assets/img/img-style-trust.webp" , tagId : "trust_button" } ,
31+ { name : "귀여운 말투" , image : "/assets/img/img-style-cute.webp" , tagId : "cute_button" } ,
2932] ;
3033
3134const STYLE_NAME_MAPPING : { [ key : string ] : string } = {
@@ -52,6 +55,8 @@ const SelectStylePage = () => {
5255 } ;
5356
5457 const handleCreateReview = ( ) => {
58+ gTagLogEvent ( "create_review_button" ) ;
59+
5560 const mappedStyle = STYLE_NAME_MAPPING [ selectedStyle . name ] ;
5661
5762 if ( mappedStyle ) {
@@ -85,7 +90,12 @@ const SelectStylePage = () => {
8590 </ div >
8691
8792 < div className = { styles . ExampleButtonBox } >
88- < button onClick = { handleOpen } >
93+ < button
94+ onClick = { ( ) => {
95+ gTagLogEvent ( "style_example_button" ) ;
96+ handleOpen ( ) ;
97+ } }
98+ >
8999 < Text variant = "bodyXsm" color = "secondary" >
90100 말투 예시보기
91101 </ Text >
@@ -105,7 +115,10 @@ const SelectStylePage = () => {
105115 className = { classNames ( {
106116 [ styles . isSelected ] : selectedStyle . name === style . name ,
107117 } ) }
108- onClick = { ( ) => handleStyleClick ( style ) }
118+ onClick = { ( ) => {
119+ gTagLogEvent ( style . tagId ) ;
120+ handleStyleClick ( style ) ;
121+ } }
109122 >
110123 < Text
111124 color = { selectedStyle . name === style . name ? "white" : "secondary" }
0 commit comments