File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 44 VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
55
66on :
7+ push :
8+ branches :
9+ - main
710 pull_request :
811 types :
912 - closed
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const HomePage = () => {
6060 < button
6161 className = { styles . ShareButton }
6262 onClick = { ( ) => {
63- gTagLogEvent ( "share_button " ) ;
63+ gTagLogEvent ( "click_share" , "Button Click" , "Share Button ") ;
6464
6565 send ( { type : AppBridgeMessageType . SHARE , payload : { shareText : getShareText ( ) } } ) ;
6666 } }
@@ -89,7 +89,7 @@ const HomePage = () => {
8989 text = "갤러리"
9090 iconName = "gallery"
9191 onClick = { ( ) => {
92- gTagLogEvent ( "gallery_button " ) ;
92+ gTagLogEvent ( "click_gallery" , "Button Click" , "Gallery Button ") ;
9393
9494 send ( { type : AppBridgeMessageType . OPEN_GALLERY , payload : "" } ) ;
9595
@@ -100,7 +100,7 @@ const HomePage = () => {
100100 text = "카메라"
101101 iconName = "camera"
102102 onClick = { ( ) => {
103- gTagLogEvent ( "camera_button " ) ;
103+ gTagLogEvent ( "click_camera" , "Button Click" , "Camera Button ") ;
104104
105105 send ( { type : AppBridgeMessageType . OPEN_CAMERA , payload : "" } ) ;
106106
Original file line number Diff line number Diff line change 1- export const gTagLogEvent = ( eventLabel : string ) => {
2- if ( typeof window !== "undefined" && typeof window . gtag === "function" ) {
3- window . gtag ( "event" , "click" , {
4- event_category : "button" ,
5- event_label : eventLabel ,
6- } ) ;
7- } else {
8- console . warn ( "Google Analytics is not initialized yet." ) ;
1+ export const gTagLogEvent = ( action : string , category = "User Interaction" , label ?: string ) => {
2+ if ( typeof window . gtag !== "function" ) {
3+ console . warn ( "GA4가 아직 로드되지 않았습니다." ) ;
4+ return ;
95 }
6+
7+ window . gtag ( "event" , action , {
8+ event_category : category ,
9+ event_label : label ,
10+ } ) ;
1011} ;
You can’t perform that action at this time.
0 commit comments