> ## 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 Flutter.

### User Identification

Identify users to track their activity:

```dart theme={null}
// Identify user with ID only
Zixflow.instance.identify(userId: 'user@example.com');

// Identify user with additional attributes
Zixflow.instance.identify(
  userId: 'user@example.com',
  traits: {
    'first_name': 'John',
    'last_name': 'Doe',
    'email': 'user@example.com',
    'plan': 'premium',
    'created_at': DateTime.now().toIso8601String(),
  },
);
```

### Event Tracking

Track custom events:

```dart theme={null}
// Simple event
Zixflow.instance.track(name: 'button_clicked');

// Event with properties
Zixflow.instance.track(
  name: 'purchase_completed',
  properties: {
    'product_id': '123',
    'product_name': 'Widget',
    'price': 29.99,
    'currency': 'USD',
  },
);

// Event with timestamp
Zixflow.instance.track(
  name: 'order_completed',
  properties: {'order_id': 'ABC123'},
  timestamp: DateTime.now().millisecondsSinceEpoch,
);
```

### Screen Tracking

Track screen views:

```dart theme={null}
// Manual screen tracking
Zixflow.instance.screen(
  title: 'Product Detail',
  properties: {
    'product_id': '123',
    'category': 'Electronics',
  },
);
```

#### Automatic Screen Tracking with GoRouter

Enable automatic screen tracking by setting `screenViewUse` in configuration:

```dart theme={null}
final config = ZixflowConfig(
  apiKey: 'YOUR_API_KEY',
  screenViewUse: ScreenView.all,  // Track all screens automatically
);
```

### Profile Attributes

Set user profile attributes:

```dart theme={null}
// Set profile attributes
Zixflow.instance.setProfileAttributes(
  attributes: {
    'age': 30,
    'gender': 'male',
    'subscription_status': 'active',
    'preferences': {'notifications': true},
  },
);
```

### Device Attributes

Set device-specific attributes:

```dart theme={null}
// Set device attributes
Zixflow.instance.setDeviceAttributes(
  attributes: {
    'app_theme': 'dark',
    'notifications_enabled': true,
    'preferred_language': 'en',
  },
);
```

### User Logout

Clear user identification when they log out:

```dart theme={null}
// Clear identified user
Zixflow.instance.clearIdentify();
```

### Register Device Token

Register device token for push notifications:

```dart theme={null}
Zixflow.instance.registerDeviceToken(deviceToken: 'YOUR_DEVICE_TOKEN');
```

***
