관리자 통계 제외와 콘텐츠 링크 정리

This commit is contained in:
2026-06-30 12:32:18 +09:00
parent 901463e5f3
commit 4e2ec3d7a2
23 changed files with 209 additions and 64 deletions

View File

@@ -10,6 +10,7 @@ import {
createSessionHashFromEvent,
recordAnalyticsHeartbeat
} from '../repositories/analytics-repository.js'
import { shouldExcludeAdminAnalytics } from './analytics-admin-exclusion.js'
const heartbeatInputSchema = z.object({
path: z.string().trim().min(1).max(500),
@@ -46,6 +47,10 @@ export const handleAnalyticsHeartbeat = async (event) => {
return { ok: true }
}
if (shouldExcludeAdminAnalytics(event)) {
return { ok: true }
}
const postSlug = normalizePostSlugForAnalytics(body.postSlug)
const pageSlug = normalizePageSlugForAnalytics(body.pageSlug)
let postId = null