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

# Core Features

> User identification, event tracking, and core SDK features for iOS.

### User Identification

Identify users to track their activity:

```swift theme={null}
import ZixflowDataPipelines

// Identify user with ID only
Zixflow.shared.identify(userId: "user@example.com")

// Identify user with additional attributes
Zixflow.shared.identify(
    userId: "user@example.com",
    traits: [
        "first_name": "John",
        "last_name": "Doe",
        "email": "user@example.com",
        "plan": "premium"
    ]
)
```

### Event Tracking

Track custom events:

```swift theme={null}
// Simple event
Zixflow.shared.track(name: "Button Clicked")

// Event with properties
Zixflow.shared.track(
    name: "Product Purchased",
    properties: [
        "product_id": "123",
        "product_name": "Widget",
        "price": 29.99,
        "currency": "USD"
    ]
)

// Event with timestamp
Zixflow.shared.track(
    name: "Order Completed",
    properties: ["order_id": "ABC123"],
    timestamp: Date()
)
```

### Screen Tracking

Track screen views:

```swift theme={null}
// Manual screen tracking
Zixflow.shared.screen(
    title: "Product Detail",
    properties: [
        "product_id": "123",
        "category": "Electronics"
    ]
)

// Enable automatic UIKit screen tracking (in configuration)
let config = SDKConfigBuilder(apiKey: "YOUR_API_KEY")
    .autoTrackUIKitScreenViews()
    .build()
```

### Profile Attributes

Set user profile attributes:

```swift theme={null}
// Set profile attributes
Zixflow.shared.setProfileAttributes([
    "age": 30,
    "gender": "male",
    "subscription_status": "active"
])
```

### Device Attributes

Set device attributes:

```swift theme={null}
// Set device-specific attributes
Zixflow.shared.deviceAttributes = [
    "app_version": "2.1.0",
    "device_model": "iPhone 14 Pro",
    "os_version": "iOS 16.4"
]
```

### User Logout

Clear user identification when they log out:

```swift theme={null}
// Clear identified user
Zixflow.shared.clearIdentify()
```

### Get Device Token

Retrieve the registered push notification device token:

```swift theme={null}
if let deviceToken = Zixflow.shared.registeredDeviceToken {
    print("Device token: \(deviceToken)")
} else {
    print("Device token not yet registered")
}
```

***
