• 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.

Install

Swift

Add the Swift package in Xcode, start it once and name your screens in SwiftUI or UIKit.

The Swift package counts iPhone and iPad apps built with SwiftUI or UIKit. It is plain Swift with no dependencies. It needs iOS 15 and Xcode 16, or newer. Mobile apps explains how apps count.

Add the app to a site#

An app counts under a site, the same way a website does.

  • The app goes with a website. Open that site's settings and add the app's bundle ID under Apps, such as com.acme.app.
  • An app with no website. In Add a site, pick An app only and enter the app's bundle ID.

Apps and sites covers separate iOS and Android IDs and app variants.

Install the package#

In Xcode, choose File, then Add Package Dependencies, and paste the address:

Text
https://github.com/ultanimus/ultanimus-swift

In a Package.swift, add it to dependencies and to your target:

swift
.package(url: "https://github.com/ultanimus/ultanimus-swift", from: "0.1.0")
swift
.product(name: "Ultanimus", package: "ultanimus-swift")

Start it#

Call start once when the app launches, with the site ID from your site's settings. It reads the bundle ID and version from your app.

SwiftUI#

AcmeApp.swift
import SwiftUI
import Ultanimus

@main
struct AcmeApp: App {
  init() {
    Ultanimus.start(site: "YOUR_SITE_ID")
  }

  var body: some Scene {
    WindowGroup {
      ContentView()
    }
  }
}

UIKit#

AppDelegate.swift
import UIKit
import Ultanimus

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    Ultanimus.start(site: "YOUR_SITE_ID")
    return true
  }
}

Name your screens#

In SwiftUI, add screen to each screen's view.

swift
struct Checkout: View {
  var body: some View {
    CheckoutForm()
      .screen("Checkout")
  }
}

In UIKit, call Ultanimus.screen in viewDidAppear.

swift
override func viewDidAppear(_ animated: Bool) {
  super.viewDidAppear(animated)
  Ultanimus.screen("Checkout")
}

Swift apps covers what counts as a view and how to name screens.

Send an event#

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

Check that it works#

Run the app from Xcode and move between a few screens. Each screen and event shows under Test events in the site's settings within a few seconds. Debug builds never count, so the dashboard stays empty until a release build sends its first event. Development builds explains test builds and staging.

Next steps#

  • Swift apps: signed-in people, what opened the app, storage and consent.
  • Visitors and offline: how apps count visitors and send without a connection.
  • App Store and Play privacy: what to answer on the App Store's form.
PreviousReact Native and ExpoNextOther frameworks

On this page

  • Add the app to a site
  • Install the package
  • Start it
  • SwiftUI
  • UIKit
  • Name your screens
  • Send an event
  • Check that it works
  • Next steps
View as Markdown