Event Structure
Every event has a name and properties:Automatic Properties
The SDK automatically adds these properties to every event:| Property | Type | Description |
|---|---|---|
time | timestamp | When the event occurred |
session_id | string | Current session identifier |
view_id | string | Current pageview identifier |
client.url | string | Current page URL |
client.referrer | string | Referring URL |
client.user_agent | string | Browser user agent |
client.viewport | object | Browser viewport dimensions |
geo_info | object | Geographic information (server-side) |
Property Types
Permutive supports several property types:- String
- Number
- Boolean
- Array
- Object
- Date
Standard Events
The SDK defines standard event types with expected properties:Pageview
Tracked automatically by the web addon:Custom Event
For non-standard tracking:Property Naming Conventions
Follow these conventions for consistent data:| Convention | Example | Notes |
|---|---|---|
| snake_case | article_title | Preferred for custom properties |
| camelCase | articleTitle | Also supported |
| Lowercase | category | Use for simple properties |
Reserved Property Names
Avoid these reserved property names:time- Automatically set by SDKsession_id- Automatically setview_id- Automatically setclient- Reserved for client contextgeo_info- Reserved for geographic data
Nested Properties
You can nest properties up to 3 levels deep:Deeply nested properties work in cohort building, but keep structures simple when possible for easier querying.
Arrays
Arrays are useful for multi-value properties:Array Limitations
- Maximum 100 items per array
- Array items should be of consistent type
- Nested arrays are not recommended
Page Properties vs Event Properties
- Page Properties
- Event Properties
Set via the web addon, applied to all events on the page:
Best Practices
Use Descriptive Names
Use Descriptive Names
Be Consistent
Be Consistent
Use the same property names and types across all events:
Avoid PII
Avoid PII
Never include personally identifiable information:
Use Appropriate Types
Use Appropriate Types
Limit Property Count
Limit Property Count
Keep events focused with relevant properties only:
Property Validation
The SDK validates properties before sending:- Invalid property types are converted or dropped
- Very long strings may be truncated
- Invalid JSON structures are rejected
Troubleshooting
Properties not appearing in dashboard
Properties not appearing in dashboard
Problem: Event tracked but properties missing in dashboard.Solutions:
- Check property names match dashboard schema
- Verify property types are correct
- Enable debug mode to see what’s sent
- Allow time for data processing
Type conversion issues
Type conversion issues
Problem: Numbers stored as strings or vice versa.Solutions:
- Explicitly cast types before tracking
- Use
parseInt()orparseFloat()for numbers - Avoid string representations of numbers
Nested properties not queryable
Nested properties not queryable
Problem: Can’t build cohorts on deeply nested properties.Solution: Flatten structure or limit nesting to 2 levels: