관리자 통계 제외와 콘텐츠 링크 정리
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
createVisitorHashFromEvent,
|
||||
recordAnalyticsPageview
|
||||
} from '../repositories/analytics-repository.js'
|
||||
import { shouldExcludeAdminAnalytics } from './analytics-admin-exclusion.js'
|
||||
|
||||
const pageviewInputSchema = z.object({
|
||||
path: z.string().trim().min(1).max(500),
|
||||
@@ -50,6 +51,10 @@ export const handleAnalyticsPageview = async (event) => {
|
||||
return { ok: true }
|
||||
}
|
||||
|
||||
if (shouldExcludeAdminAnalytics(event)) {
|
||||
return { ok: true }
|
||||
}
|
||||
|
||||
const postSlug = normalizePostSlugForAnalytics(body.postSlug)
|
||||
const pageSlug = normalizePageSlugForAnalytics(body.pageSlug)
|
||||
let postId = null
|
||||
|
||||
Reference in New Issue
Block a user