diff --git a/CHANGELOG.md b/CHANGELOG.md index ba27dca..3c4f638 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Improved +- **Smarter referrer attribution.** Traffic that arrives without a referrer on a deep page (like a blog post) is now shown as "Shared Link" instead of "Direct." Real direct traffic — visitors who land on your homepage — still shows as "Direct." This gives you a much clearer picture of where your traffic actually comes from, since most unattributed deep-page visits are people clicking links shared in messaging apps or AI chatbots that strip the referrer header. +- **More in-app browsers detected.** Pulse now recognises visits from WhatsApp, Telegram, Snapchat, Pinterest, Reddit, and Threads in-app browsers and attributes them correctly instead of lumping them into "Direct." - **Dashboard blocks are now consistent in height.** The Goals & Events and Scroll Depth panels now match the height of every other block on the dashboard. - **Cleaner period picker.** The date range dropdown now has visual separators between the rolling windows (Today, Last 7 days, Last 30 days), the calendar periods (This week, This month), and Custom — so it's easy to tell them apart at a glance. - **New date range options.** The period selector now includes "This week" (Monday to today) and "This month" (1st to today) alongside the existing rolling windows. Your selection is remembered between sessions. diff --git a/lib/utils/icons.tsx b/lib/utils/icons.tsx index 2b45fec..bd31f15 100644 --- a/lib/utils/icons.tsx +++ b/lib/utils/icons.tsx @@ -18,6 +18,12 @@ import { YoutubeLogo, RedditLogo, Robot, + Link, + WhatsappLogo, + TelegramLogo, + SnapchatLogo, + PinterestLogo, + ThreadsLogo, } from '@phosphor-icons/react' /** @@ -63,6 +69,11 @@ export function getReferrerIcon(referrerName: string) { if (lower.includes('github')) return if (lower.includes('youtube')) return if (lower.includes('reddit')) return + if (lower.includes('whatsapp')) return + if (lower.includes('telegram')) return + if (lower.includes('snapchat')) return + if (lower.includes('pinterest')) return + if (lower.includes('threads')) return // AI assistants and search tools if (lower.includes('chatgpt') || lower.includes('openai')) return if (lower.includes('perplexity')) return @@ -73,11 +84,13 @@ export function getReferrerIcon(referrerName: string) { if (lower.includes('grok') || lower.includes('x.ai')) return if (lower.includes('phind')) return if (lower.includes('you.com')) return + // Shared Link (unattributed deep-page traffic) + if (lower === 'shared link') return return } -const REFERRER_NO_FAVICON = ['direct', 'unknown', ''] +const REFERRER_NO_FAVICON = ['direct', 'shared link', 'unknown', ''] /** Common subdomains to skip when deriving the main label (e.g. l.instagram.com → instagram). */ const REFERRER_SUBDOMAIN_SKIP = new Set([ @@ -100,6 +113,7 @@ const REFERRER_DISPLAY_OVERRIDES: Record = { telegram: 'Telegram', pinterest: 'Pinterest', snapchat: 'Snapchat', + threads: 'Threads', tumblr: 'Tumblr', quora: 'Quora', 't.co': 'X',