feat: 앱 GA4 이벤트 틀(track, 웹과 같은 이벤트 목록을 shared로) — 기존 앱 기능에 창_열기·각_보기·글_열기·로그인·지역_변경·좋아요·댓글·신고·차단·약관_동의·공유, 전송은 Firebase 연결 뒤. 탭 밖 화면용 루트 스택

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
skkimandClaude committed 2026-11-04 16:52:08 +09:00
1 parent fcc7ed804c
commit cab3336859
20 files changed
+201 -110

No files matched your search

+4
View File
@@ -3,12 +3,16 @@ import type { RefObject } from 'react';
import { Share, type View } from 'react-native';
import { captureRef } from 'react-native-view-shot';
import { track } from '@/lib/analytics';
/** 보이는 화면 조각을 PNG로 찍어 공유. 이미지 공유가 안 되는 곳(웹 등)이면 글로 보낸다 */
export async function shareView(ref: RefObject<View | null>, { title, message }: { title: string; message: string }) {
try {
if (ref.current && (await Sharing.isAvailableAsync())) {
const uri = await captureRef(ref, { format: 'png', quality: 1, result: 'tmpfile' });
await Sharing.shareAsync(uri, { mimeType: 'image/png', UTI: 'public.png', dialogTitle: title });
// 앱은 보이는 카드를 그대로 찍어 보내므로 비율은 'card'
track('share', { content_type: 'image', item_id: title, method: 'share_sheet', ratio: 'card' });
return;
}
await Share.share({ message });