• Product

    • FeaturesFunnels, alerts, AI traffic and imports.
    • Live mapVisitors on a globe as they arrive.
    • SpeedA script under 1 KB. Visits in a second.
    • Integrations26 tools, from Slack to WordPress.
    • MCP serverAI tools set up sites and dashboards.

    Get started

    • Quick startOne script tag, and visits show up.
    • With an AI agentOne prompt, and your agent adds it.
    • API and CLIYour numbers in scripts and CI.
    • Install guides
      • Script tag
      • Next.js
      • React
      • Website builders
    Live demoacme.devLast 30 daysVisitors1,49325.5%PageVisitors/612/pricing341/docs/install208Click around before you sign up.Open the demoCompareHow we stack up against Google Analytics, Plausible, Fathom, PostHog and Umami
  • Company

    • AboutWhy it exists and how it is built.
    • BlogPrivacy, speed and how we build.
    • ContactQuestions on plans, setup or privacy.
    • BrandThe logo, colors, type and files.

    Trust

    • PrivacyWhat we collect and why.
    • TermsPlans, limits and your data.
    • StatusWhether everything is up right now. (opens in a new tab)
    Latest post4checks before DirectWhere Direct traffic comes fromNov 11, 2026Read the post
  • Blog
  • Docs
  • Pricing
Sign inStart free
FeaturesDemoSpeedBlogDocsPricing
Start freeSign in

Free for three sites. No card needed.

Getting started

  • Introduction
  • Quick start
  • Set up with an AI agent
  • CLI
  • CLI guide
  • How counting works

Install

  • Script tag
  • Next.js
  • React
  • React Native and Expo
  • Swift
  • Other frameworks
  • Server
  • Website builders

Mobile

  • Mobile apps
  • Screens and events
  • Swift apps
  • Development builds
  • Visitors and offline
  • App Store and Play privacy

Dashboard

  • Overview and filters
  • Custom dashboards
  • Realtime
  • Events page
  • Explore
  • Segments
  • Sessions
  • People
  • Journeys
  • Retention
  • Load
  • Web vitals
  • Errors
  • Revenue
  • Search Console
  • Visibility
  • Data quality
  • Transfer a site
  • Import and export
  • Scheduled reports

Tracking

  • Custom events
  • Signed-in users
  • Links and downloads
  • Goals and funnels
  • Alerts
  • Annotations
  • Excluded pages
  • Page addresses
  • Share links and embeds
  • Sitemaps

API

  • Overview
  • Query API
  • Load and vitals
  • Raw export
  • Live stream
  • MCP server

Platform

  • Architecture
  • Privacy and data

Getting started

  • Introduction
  • Quick start
  • Set up with an AI agent
  • CLI
  • CLI guide
  • How counting works

Install

  • Script tag
  • Next.js
  • React
  • React Native and Expo
  • Swift
  • Other frameworks
  • Server
  • Website builders

Mobile

  • Mobile apps
  • Screens and events
  • Swift apps
  • Development builds
  • Visitors and offline
  • App Store and Play privacy

Dashboard

  • Overview and filters
  • Custom dashboards
  • Realtime
  • Events page
  • Explore
  • Segments
  • Sessions
  • People
  • Journeys
  • Retention
  • Load
  • Web vitals
  • Errors
  • Revenue
  • Search Console
  • Visibility
  • Data quality
  • Transfer a site
  • Import and export
  • Scheduled reports

Tracking

  • Custom events
  • Signed-in users
  • Links and downloads
  • Goals and funnels
  • Alerts
  • Annotations
  • Excluded pages
  • Page addresses
  • Share links and embeds
  • Sitemaps

API

  • Overview
  • Query API
  • Load and vitals
  • Raw export
  • Live stream
  • MCP server

Platform

  • Architecture
  • Privacy and data

Cookieless web and product analytics. Fast to load, fast to read.

Start free, no card needed

Product

FeaturesLive mapDemoTry it on your siteSpeedPricingCompare

Get started

InstallDocsQuestionsSign inStart freeJoin the waitlist

Company

AboutBlogContactStatus (opens in a new tab)Brand

Legal

Privacy policyTerms of service

© 2026 Ultanimus. This site sets no cookies.

Mobile

Swift apps

The Swift package: its calls for screens, events and signed-in people, and its options for test builds, storage and consent.

The Swift package counts iPhone and iPad apps. This page covers its calls for screens, events, signed-in people and what opened the app, and its options for test builds, storage and consent.

Screens#

A view counts when the screen changes. The same screen twice in a row counts once, and going back to a screen counts it again, as the back button does on the web. Coming back from the background counts no view.

In SwiftUI, screen counts a view each time the screen appears.

swift
ProductDetail(product: product)
  .screen("Product")

In UIKit, or from anywhere else, call Ultanimus.screen.

swift
Ultanimus.screen("Product")

Name the kind of screen, such as Product, and leave IDs out of the name. Screens then group on the dashboard, and IDs never leave the phone.

Send an event#

swift
Ultanimus.track("add_to_cart", ["sku": "lamp", "quantity": 2])

Property values are strings, numbers or booleans. Custom events covers naming and properties, and the same events work in goals and funnels.

Signed-in users#

Call identify with your own ID for the signed-in person, and with nil on sign out. They then count as one visitor across days and devices, on the web and in the app.

swift
Ultanimus.identify(account.id)

Use an ID from your database, never an email address or a name. Signed-in users explains what is stored.

What opened the app#

A link that opens the app with utm_source, utm_medium, utm_campaign or ref in its address names the visit's source, as it does on a web page. Pass each link your app receives to opened.

swift
ContentView()
  .onOpenURL { Ultanimus.opened($0) }

In UIKit, pass the links from your scene delegate's scene(_:openURLContexts:). For anything else that opens the app, such as a notification, call opened with a source before the next screen shows.

swift
Ultanimus.opened(source: "push", campaign: "black-friday")

A visit with neither shows as Direct. Installs from the App Store carry no source yet.

Test builds#

Debug builds never count and show under Test events. Pass debug: true to log every event to Xcode's console.

TestFlight builds are release builds, so they count like the App Store app. Pass development: true in those builds to send them as test events instead. development: false counts a debug build, for a quick check of the dashboard.

swift
Ultanimus.start(site: "YOUR_SITE_ID", development: true)

Storage#

The package stores nothing on the phone by default, so each cold start counts as a new visitor. To count a person once a day across restarts, pass storage. Storing data on a device can need consent where you ship, so check before you turn it on.

swift
Ultanimus.start(site: "YOUR_SITE_ID", storage: .standard)

Any UserDefaults works, such as the one your app group shares. Visitors and offline explains what it keeps.

Turn it off#

Pass enabled: false until a person agrees to analytics, and call start again when their choice changes. While it is off the package queues and sends nothing.

swift
Ultanimus.start(site: "YOUR_SITE_ID", enabled: consent)

Other Apple platforms#

The package counts iPhone and iPad apps. It also builds for macOS, Mac Catalyst, tvOS, watchOS and visionOS, so a shared target compiles, and it sends nothing there.

PreviousScreens and eventsNextDevelopment builds

On this page

  • Screens
  • Send an event
  • Signed-in users
  • What opened the app
  • Test builds
  • Storage
  • Turn it off
  • Other Apple platforms
View as Markdown