feat: 새 기능 GA4 이벤트 — 창 열기·좋아요·댓글·신고·차단·약관 동의·이야기 글쓰기·히어로 오늘/내일·쇼츠·단풍 지도·내 각·토스 인트로·설치 띠 닫기

This commit is contained in:
minaChoi committed 2026-10-28 11:25:58 +09:00
1 parent 1489030c5f
commit 728b24a0c9
13 files changed
+110 -18

No files matched your search

+6 -4
View File
@@ -15,6 +15,7 @@ import { CommentIcon, HeartIcon, SendIcon } from './svg'
import { useCarousel } from './carousel'
import { MoonArt } from './moon'
import { Arrows, Credit, Ic, Rows, Skel, TAP44, Thumb } from './ui'
import { track } from '../lib/analytics'
const ACCOUNTS: Record<PostType, readonly [string, string]> = {
[PostType.WEATHER]: ['오늘 날씨', 'sun'],
@@ -416,10 +417,11 @@ function FullCard({ post }: PostProps) {
;(on ? like : unlike).mutate(
{ path: { post_id: post.post_id } },
{
onSuccess: (res) =>
res.result?.success
? patch({ liked: res.liked ?? on, ...(res.like_count != null ? { like_count: res.like_count } : {}) })
: revert(),
onSuccess: (res) => {
if (!res.result?.success) return revert()
patch({ liked: res.liked ?? on, ...(res.like_count != null ? { like_count: res.like_count } : {}) })
if (on) track('like', { content_type: 'post', item_id: post.post_id })
},
onError: revert,
},
)