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.
Key Features
Section titled “Key Features”- 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
Page Structure
Section titled “Page Structure”| Route | Purpose |
|---|---|
/business/apps/shortlinks | Dashboard with stats, quick nav, and recent links |
/business/apps/shortlinks/links | Full list of all shortened links |
/business/apps/shortlinks/links/new | Create a new short link with all options |
/business/apps/shortlinks/links/[id] | Link detail view with analytics |
/business/apps/shortlinks/splash | List of splash pages |
/business/apps/shortlinks/splash/new | Create a new splash page |
/business/apps/shortlinks/splash/[id] | Edit a splash page |
/business/apps/shortlinks/settings | App-level settings |
Dashboard
Section titled “Dashboard”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.
Create Link
Section titled “Create Link”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
Section titled “Splash Pages”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.
Data Model
Section titled “Data Model”| Table | Description |
|---|---|
ext_shortlinks.links | Core link record with slug, destination, status, password, expiration, UTM params |
ext_shortlinks.splash_pages | Splash page configuration (name, title, description, logo, redirect delay, custom CSS) |
Key Types
Section titled “Key Types”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, metadataSplashPage— id, user_id, name, title, description, logo_url, redirect_delay, show_ad, custom_css, metadataLinkWithSplash— Link with nested splash_page object
Key Components
Section titled “Key Components”| Component | Location |
|---|---|
| Dashboard | src/routes/(app)/business/apps/shortlinks/+page.svelte |
| Create link form | src/routes/(app)/business/apps/shortlinks/links/new/+page.svelte |
| Splash page list | src/routes/(app)/business/apps/shortlinks/splash/+page.svelte |
Services
Section titled “Services”Server-side logic lives in $lib/apps/shortlinks/services/index.js:
getStats(userId)— dashboard aggregate statslistLinks(userId)— list all linkscreateLink(userId, data)— create a shortened linklistSplashes(userId)— list splash pages for dropdown