Appearance
Profile Attributes
Learn about the predefined and default attributes available in user profiles.
Default Device/App-Specific Attributes
The SDK automatically collects the following device and app-specific attributes:
System Information
- Device Model - The device model (e.g., iPhone 14, Samsung Galaxy S23)
- Device OS Version - Operating system version
- BuildVersion - App build version
- AppVersion - App version number
Location & Time
- TimeZone - Device timezone
- TimeZoneDaylight - Daylight saving time status
- TimeZoneAbbreviation - Timezone abbreviation (e.g., PST, EST)
- IP based location - Location derived from IP address
- Latitude - GPS latitude (if available and enabled)
- Longitude - GPS longitude (if available and enabled)
Network & Carrier
- Network Carrier - Mobile network carrier
- SystemLocaleCode - System locale code
Predefined User Attributes
Personal Information
Attribute | Type | Description |
---|---|---|
firstName | string | User's first name (max 64 characters) |
middleName | string | User's middle name (max 64 characters) |
lastName | string | User's last name (max 64 characters) |
userName | string | User's username (max 64 characters) |
email | string | User's email address |
phone | string | Phone number (must start with + and be numeric) |
language | string | User's preferred language |
localeCode | string | User's locale code |
occupation | string | User's occupation |
qualification | string | User's educational qualification |
Demographics
Attribute | Type | Description | Values |
---|---|---|---|
age | number | User's age | Numeric value |
gender | number | User's gender | 1=male, 2=female, 3=other, 4=reset |
maritalStatus | number | Marital status | 1=single, 2=engaged, 3=married, 4=widow, 5=divorced, 6=reset |
orientation | number | User orientation | Numeric value |
Date of Birth
Attribute | Type | Description | Validation |
---|---|---|---|
year | number | Birth year | Must be greater than 1900 |
month | number | Birth month | 1-12 |
day | number | Birth day | 1-31 |
Location Attributes
Attribute | Type | Description |
---|---|---|
latitude | number | User's latitude coordinate |
longitude | number | User's longitude coordinate |
carrier | string | Mobile carrier information |
Social Media Integration
Attribute | Type | Description |
---|---|---|
appuID | string | Application-specific user ID |
facebookID | string | Facebook profile ID |
twitterID | string | Twitter profile ID |
foursquareID | string | Foursquare profile ID |
linkedinID | string | LinkedIn profile ID |
googleplusID | string | Google+ profile ID |
enterpriseUID | string | Enterprise user ID |
advertisingID | string | Advertising identifier |
instagramID | string | Instagram profile ID |
pinterest | string | Pinterest profile ID |
Privacy & Opt-in Settings
Attribute | Type | Description | Values |
---|---|---|---|
email_opt | number | Email opt-in/out status | 0=opt-in, 1=opt-out |
sms_opt | number | SMS opt-in/out status | 0=opt-in, 1=opt-out |
push_opt | number | Push notification opt-in/out | 0=opt-in, 1=opt-out |
data_opt | number | Data collection opt-in/out | 0=opt-in, 1=opt-out |
ip_opt | number | IP tracking opt-in/out | 0=opt-in, 1=opt-out |
Usage Example
javascript
import 'package:upshot_flutter/upshot_flutter.dart';
static void setUserProfile() {
Map<dynamic, dynamic> profileAttributes = {
// Personal information
UpshotProfileAttributes.userName: "Name of the user",
UpshotProfileAttributes.email: "email@example.com",
UpshotProfileAttributes.phone: "+919999999999",
UpshotProfileAttributes.appuID: "applicationRegId",
// Demographics
UpshotProfileAttributes.age: 25,
UpshotProfileAttributes.gender: UpshotGender.male,
UpshotProfileAttributes.maritalStatus: 1, // Single
// Date of birth
UpshotProfileAttributes.year: 1993,
UpshotProfileAttributes.month: 6,
UpshotProfileAttributes.day: 15,
UpshotProfileAttributes.language: "en",
// Social media
UpshotProfileAttributes.facebookID: "john.doe.123",
UpshotProfileAttributes.linkedinID: "johndoe",
// Privacy settings
UpshotProfileAttributes.email_opt: 0, // Opted in for emails
UpshotProfileAttributes.push_opt: 0, // Opted in for push notifications
UpshotProfileAttributes.sms_opt: 1, // Opted out of SMS
};
// Set user profile
FlutterUpshotPlugin.sendUserDetails(profileAttributes);
}
Validation Rules
Important Validation Rules
- Phone Numbers: Must start with + followed by numeric values only
- String Length: Maximum 64 characters for string fields
- Birth Year: Must be greater than 1900
- Email Format: Must be a valid email format
- Gender Values: Only 1, 2, 3, or 4 are accepted
- Opt-in Values: Only 0 (opt-in) or 1 (opt-out) are accepted
Best Practices
- Data Quality: Always validate data before setting user attributes
- Privacy Compliance: Respect user privacy settings and local regulations
- Consistent Formatting: Use consistent formats for dates, phone numbers, etc.
- Regular Updates: Keep user profiles updated as information changes
- Meaningful Data: Only collect attributes that provide value to your application