Skip to main content
Event properties allow you to add structured, typed data to your events. Properties must match your dashboard schema exactly, or the event will be rejected.

Basic Usage

Enrichment

Common Patterns

Supported Types

EventProperties can contain the following types:

Nullable Values

The API accepts nullable types. Properties with null 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


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:
This enriches events with:
  • ISP_INFO: Internet Service Provider details
  • GEO_INFO: Geographic location (country, region, city)
  • IP_ADDRESS_HASH: Hashed IP address for privacy
Contact Technical Services for configuration details.

Watson NLP Enrichment

Add IBM Watson Natural Language Understanding data:
See IBM Watson Integration for details.

Complete Enrichment Example


Type-Specific Methods (Java)

When building properties in Java, use type-specific methods for lists:

Common Patterns


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
❌ Invalid:
  • Misspelled property names
  • Wrong property types
  • Missing required properties

Common Validation Errors

Problem: Event rejected with “Schema validation failed” Causes:
  1. Property name doesn’t match dashboard (case-sensitive)
  2. Property type doesn’t match schema
  3. Required property missing
Solutions:
  1. Verify property names in dashboard
  2. Check property types match
  3. Include all required properties
Example of incorrect types:

Best Practices

  • 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
Never send unhashed PII:

Troubleshooting

Solutions:
  1. Check property names match schema exactly
  2. Verify property types are correct
  3. Ensure event is being accepted (check logs)
  4. Confirm properties are defined in dashboard schema
Cause: Incompatible type passed to builder.Solution: Ensure types match:
Solution: Ensure nested properties are defined in your dashboard schema:

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
Java:
  • EventProperties.Builder() - Create builder
  • builder.with(key: String, value: Any) - Add property
  • builder.withStrings(key: String, values: List<String>) - Add string list
  • builder.withIntegers(key: String, values: List<Int>) - Add integer list
  • builder.withLongs(key: String, values: List<Long>) - Add long list
  • builder.withBooleans(key: String, values: List<Boolean>) - Add boolean list
  • builder.withDoubles(key: String, values: List<Double>) - Add double list
  • builder.build() - Build EventProperties

Enrichment Constants

  • EventProperties.ISP_INFO - ISP enrichment
  • EventProperties.GEO_INFO - Geographic enrichment
  • EventProperties.IP_ADDRESS_HASH - IP address hash
  • EventProperties.ALCHEMY_* - Watson NLP enrichment constants