Skip to content

Short Links

The Short Links app provides URL shortening with custom slugs, password protection, expiration dates, splash page interstitials, and UTM parameter tracking. It includes click analytics across the platform’s shared analytics system.

  • Shorten any URL with auto-generated or custom slugs
  • Password-protected links
  • Expiration date support with automatic status transitions (active/expired)
  • Splash page interstitials with configurable redirect delay
  • Full UTM parameter support (source, medium, campaign)
  • Click tracking and analytics dashboard
  • Stats overview: total links, active, expired, total clicks
RoutePurpose
/business/apps/shortlinksDashboard with stats, quick nav, and recent links
/business/apps/shortlinks/linksFull list of all shortened links
/business/apps/shortlinks/links/newCreate a new short link with all options
/business/apps/shortlinks/links/[id]Link detail view with analytics
/business/apps/shortlinks/splashList of splash pages
/business/apps/shortlinks/splash/newCreate a new splash page
/business/apps/shortlinks/splash/[id]Edit a splash page
/business/apps/shortlinks/settingsApp-level settings

Displays four stat cards (Total Links, Active, Expired, Clicks) and a quick-nav grid with links to the Links list, Splash Pages, and Settings sections. The five most recent links are shown with slug (monospace), status badge, and truncated destination URL.

The creation form collects:

  • Destination URL (required)
  • Title — friendly name for identification
  • Custom slug — leave blank for auto-generation
  • Password — optional access protection
  • Expiration date — datetime-local input
  • Splash page — select from existing splash pages
  • UTM parameters — source, medium, and campaign fields in a collapsible section

The form loads available splash pages from the server to populate the dropdown.

Splash pages are interstitial screens displayed before redirecting to the destination. Each splash page has a name and configurable redirect delay (in seconds). They can be assigned to any short link during creation.

TableDescription
ext_shortlinks.linksCore link record with slug, destination, status, password, expiration, UTM params
ext_shortlinks.splash_pagesSplash page configuration (name, title, description, logo, redirect delay, custom CSS)
  • Link — id, user_id, destination_url, slug, title, status (active | inactive | expired), password, expires_at, splash_page_id, utm_source/medium/campaign/term/content, is_sensitive, metadata
  • SplashPage — id, user_id, name, title, description, logo_url, redirect_delay, show_ad, custom_css, metadata
  • LinkWithSplash — Link with nested splash_page object
ComponentLocation
Dashboardsrc/routes/(app)/business/apps/shortlinks/+page.svelte
Create link formsrc/routes/(app)/business/apps/shortlinks/links/new/+page.svelte
Splash page listsrc/routes/(app)/business/apps/shortlinks/splash/+page.svelte

Server-side logic lives in $lib/apps/shortlinks/services/index.js:

  • getStats(userId) — dashboard aggregate stats
  • listLinks(userId) — list all links
  • createLink(userId, data) — create a shortened link
  • listSplashes(userId) — list splash pages for dropdown