Supported Types
EventProperties can contain the following types:| Type | Kotlin/Java Type | Example |
|---|---|---|
| Boolean | Boolean | true, false |
| Integer | Int, Long | 42, 1000L |
| String | String | "Technology" |
| Float | Float, Double | 99.99, 3.14f |
| DateTime | java.util.Date | Date() |
| Nested Object | EventProperties | Nested properties |
| List | List<T> | List of any supported type |
Nullable Values
The API accepts nullable types. Properties withnull values will be automatically filtered and not sent with the event.
Creating Event Properties
Nested Properties
Use nested EventProperties to represent hierarchical data structures:Complete Example
Here’s a complete example matching a typical Pageview event schema:Schema Definition
| Name | Type |
|---|---|
| id | Long |
| description | String |
| tags | List of String |
| published_at | DateTime |
| user.type | String |
| user.premium | Boolean |
Event Enrichment
Events can be enriched with additional information automatically by using special constants.Location and ISP Enrichment
Add location and ISP data to events using these constants:- ISP_INFO: Internet Service Provider details
- GEO_INFO: Geographic location (country, region, city)
- IP_ADDRESS_HASH: Hashed IP address for privacy
Watson NLP Enrichment
Add IBM Watson Natural Language Understanding data:Complete Enrichment Example
Type-Specific Methods (Java)
When building properties in Java, use type-specific methods for lists:Common Patterns
E-Commerce Properties
E-Commerce Properties
Content Properties
Content Properties
User Context Properties
User Context Properties
Validation and Errors
Schema Validation
Properties are validated against your event schema in the Permutive dashboard: ✅ Valid:- Property names match exactly (case-sensitive)
- Property types match schema
- All required properties included
- Misspelled property names
- Wrong property types
- Missing required properties
Common Validation Errors
Problem: Event rejected with “Schema validation failed” Causes:- Property name doesn’t match dashboard (case-sensitive)
- Property type doesn’t match schema
- Required property missing
- Verify property names in dashboard
- Check property types match
- Include all required properties
Best Practices
- Do
- Don't
- Match property names and types exactly with your schema
- Use enrichment constants when available
- Create reusable property builder functions
- Use nested properties for related data
- Include relevant context properties
- Validate against your schema before deploying
Troubleshooting
Properties not appearing in dashboard
Properties not appearing in dashboard
Solutions:
- Check property names match schema exactly
- Verify property types are correct
- Ensure event is being accepted (check logs)
- Confirm properties are defined in dashboard schema
Type conversion errors / App crashes
Type conversion errors / App crashes
Cause: Incompatible type passed to builder.Solution: Ensure types match:
Nested properties not recognized
Nested properties not recognized
Solution: Ensure nested properties are defined in your dashboard schema:
Related Documentation
Page Tracking
Using properties with PageTracker
Event Tracking
Using properties with EventTracker
Identity Management
Hashing PII
Issues
Solutions to common issues
API Reference
For complete API documentation, see the Javadocs.EventProperties Class
Kotlin:EventProperties.from(vararg pairs: Pair<String, Any?>)- Create from pairs
EventProperties.Builder()- Create builderbuilder.with(key: String, value: Any)- Add propertybuilder.withStrings(key: String, values: List<String>)- Add string listbuilder.withIntegers(key: String, values: List<Int>)- Add integer listbuilder.withLongs(key: String, values: List<Long>)- Add long listbuilder.withBooleans(key: String, values: List<Boolean>)- Add boolean listbuilder.withDoubles(key: String, values: List<Double>)- Add double listbuilder.build()- Build EventProperties
Enrichment Constants
EventProperties.ISP_INFO- ISP enrichmentEventProperties.GEO_INFO- Geographic enrichmentEventProperties.IP_ADDRESS_HASH- IP address hashEventProperties.ALCHEMY_*- Watson NLP enrichment constants