EventProperties class to encapsulate this data with type safety.
Basic Usage
Supported Types
Enrichment
Creating Properties
EventProperties wraps a dictionary with type validation. Invalid types throw an exception on construction.
Supported Types
EventProperties supports the following value types:
Nested Objects
Arrays
Event Enrichment
Events can be enriched with server-side data using special property values:Available Enrichment Values
Location and ISP Enrichment
Watson Content Analysis (Standard Cohorts)
For Standard Cohorts support, include Watson taxonomy labels:Standard Cohorts Requirement: For Standard Cohorts to work, both a valid URL in the Context and the
classifications_watson.taxonomy_labels property must be set. Contact your Customer Success Manager (CSM) to enable this feature.Schema Validation
Common Schema Errors
Enable debug logging to see schema validation errors:Property Name Rules
Property names must follow these rules:- Only alphanumeric characters and underscores:
[a-zA-Z0-9_] - Cannot start with a number
- Case-sensitive
- Valid Names
- Invalid Names
Using Properties with PageTracker
Properties passed toPageTracker are included with automatically generated events:
Updating Properties Dynamically
For values that change during tracking, use the Objective-C style setter:Best Practices
- Do
- Don't
- Match property names and types exactly to your schema
- Use consistent property names across your app
- Use meaningful, descriptive property names
- Validate properties exist in your schema before deploying
- Use nested properties for complex structured data
- Test with debug logging enabled
Troubleshooting
Event rejected with schema error
Event rejected with schema error
Problem: Console shows schema validation errors.Solutions:
- Check property names match your dashboard schema exactly
- Verify property types are correct (string vs int vs bool)
- Remove any extra properties not in the schema
- Check for typos in property names
EventProperties init throws exception
EventProperties init throws exception
Problem: Creating EventProperties fails.Solutions:
- Verify all values are supported types
- Ensure no unsupported types like custom objects
- Check nested EventProperties are valid
Enrichment values not working
Enrichment values not working
Problem: Geo/ISP data not appearing.Solutions:
- Ensure your schema includes the enrichment property
- Contact support to verify enrichment is enabled
- Check you’re using the correct enrichment value constant
Related Documentation
Page Tracking
Using properties with PageTracker
Event Tracking
Tracking custom events
Contextual Data
Content-based segmentation
Issues
Common problems and solutions