@@ -6,6 +6,7 @@ import Image from 'next/image';
66import KakaoMapRecommend from '@/components/map/kakaoMapRecommend' ;
77import { useRecommend } from '@/hooks/api/query/useRecommend' ;
88import { useCheckMeeting } from '@/hooks/api/query/useCheckMeeting' ;
9+ import { sendGAEvent } from '@next/third-parties/google' ;
910
1011function RecommendContent ( ) {
1112 const router = useRouter ( ) ;
@@ -148,6 +149,20 @@ function RecommendContent() {
148149 }
149150 } ;
150151
152+ // 장소 리스트 중 하나 클릭 시 GA 전송 (place_list_viewed)
153+ const handlePlaceClick = ( place : ( typeof places ) [ 0 ] ) => {
154+ setSelectedPlaceId ( place . id ) ;
155+ if ( meetingId ) {
156+ const candidateId = `place_${ String ( place . id ) . padStart ( 2 , '0' ) } ` ;
157+ sendGAEvent ( 'event' , 'place_list_viewed' , {
158+ meeting_url_id : meetingId ,
159+ candidate_id : candidateId ,
160+ place_category : place . category ,
161+ rank_order : place . id ,
162+ } ) ;
163+ }
164+ } ;
165+
151166 return (
152167 < div className = "flex items-center justify-center p-0 md:min-h-[calc(100vh-200px)] md:py-25" >
153168 < div className = "flex h-full w-full flex-col bg-white md:h-175 md:w-174 md:flex-row md:gap-2 lg:w-215" >
@@ -194,7 +209,7 @@ function RecommendContent() {
194209 { places . map ( ( place ) => (
195210 < div
196211 key = { place . id }
197- onClick = { ( ) => setSelectedPlaceId ( place . id ) }
212+ onClick = { ( ) => handlePlaceClick ( place ) }
198213 className = { `flex cursor-pointer flex-col gap-2 rounded border p-4 ${
199214 selectedPlaceId === place . id
200215 ? 'border-blue-5 border-2'
0 commit comments