---
title: Customize autocaptured screen names - iOS
description: Customize screen names collected via autocapture in UIKit and SwiftUI apps
source_url:
  html: https://docs.contentsquare.com/fr/csq-sdk-ios/product-analytics/customize-autocaptured-screen-names/
  md: https://docs.contentsquare.com/fr/csq-sdk-ios/product-analytics/customize-autocaptured-screen-names/index.md
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

> **Note**
>
> Cette page est affichée en anglais car elle n'est pas disponible dans votre langue.

By default, UIKit and SwiftUI autocapture use view controller class names as the screen name. This can be overridden with the following techniques.

## View controllers

UIKit autocapture is powered by `UIViewController` lifecycles. When a view controller appears, the SDK uses its class name and title text as the default label for events.

For many apps, the class name provides enough information to uniquely identify the screen without applying code.

To refine the name for a given class, override the `csqScreenNameOverride` class property.

In the below example, `SignUpFlowViewController` is given the screen name "Main Signup Flow".

```swift
extension SignUpFlowViewController {
    open override class var csqScreenNameOverride: String? {
        "Main Signup Flow"
    }
}
```

## SwiftUI views

SwiftUI screenview autocapture builds on UIKit autocapture. When a view controller appears, for example through a `NavigationLink`, `TabView`, or `UIHostingController`, the SDK uses its class name and title text as the default label for events.

For hybrid SwiftUI/UIKit apps and apps with distinct screen titles, the default label is often enough without code changes.

For pure SwiftUI apps, the default label may not be specific enough, because SwiftUI can erase type information. To give the screenview a stable name, add the `csqScreenName` view modifier next to modifiers like `navigationTitle` or inside the view body.

In the below example, `TransactionView` is given the screen name "TransactionScreen".

```swift
struct TransactionView: View {

    let transaction: Transaction

    var body: some View {
        ScrollView {
            ...
        }
        .navigationTitle("title-transaction")
        .csqScreenName("TransactionScreen")
    }
}
```


```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"Customize autocaptured screen names","description":"Customize screen names collected via autocapture in UIKit and SwiftUI apps","url":"https://docs.contentsquare.com/fr/csq-sdk-ios/product-analytics/customize-autocaptured-screen-names/","inLanguage":"en","dateModified":"2026-10-26T11:05:20-07:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Documentation technique Contentsquare","url":"https://docs.contentsquare.com/"}}
```