feat(admin): add SEO/GEO publication catalog with crawler stats
Memind CI / Test, build, and release guards (push) Successful in 3m38s
Memind CI / Test, build, and release guards (push) Successful in 3m38s
Expose a DB-backed catalog of all online publications with SEO, GEO, total, and bot view counts from h5_publication_views for the memind_adm dashboard. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -62,6 +62,22 @@ function matchHostRule(hostname, rules = []) {
|
||||
return '';
|
||||
}
|
||||
|
||||
export function classifyReferrerHost(hostname) {
|
||||
const host = normalizeHostname(hostname);
|
||||
if (!host) {
|
||||
return { discovery_channel: 'direct', discovery_source: 'direct' };
|
||||
}
|
||||
const geoSource = matchHostRule(host, GEO_HOST_RULES);
|
||||
if (geoSource) {
|
||||
return { discovery_channel: 'geo', discovery_source: geoSource };
|
||||
}
|
||||
const seoSource = matchHostRule(host, SEO_HOST_RULES);
|
||||
if (seoSource) {
|
||||
return { discovery_channel: 'seo', discovery_source: seoSource };
|
||||
}
|
||||
return { discovery_channel: 'referral', discovery_source: 'other' };
|
||||
}
|
||||
|
||||
function normalizeDiscoveryChannel(value) {
|
||||
const channel = String(value ?? '').trim().toLowerCase();
|
||||
return channel === 'seo' || channel === 'geo' ? channel : '';
|
||||
|
||||
Reference in New Issue
Block a user