Adding new event types

Rakam automatically discovers the schema when you send a new event to Rakam API. If you send a new event called add_to_card along with the properties quantity and total_basket_amount, we will insert a new row with the event_type column value add_to_card and the properties quantity and total_basket_amount inside the properties variant column. You can access these values using properties::quantity and properties::total_basket_amount respectively.

Please note that the schemas are discovered automatically in Rakam but we enforce a strict schema for convenience. If you use a number value for an event property, you should send all the values as a number. The system tries to cast the values if you send a different type such as string but if the cast fails, we trigger a system event called $invalid_schema. The $invalid_schema includes all the properties with their values in JSON format so that you can backfill the historical data by parsing the value later on. The same rule applies to all the array and primitive values.

By default, there are 250 character limits on string properties. You can increase the limit by changing the default configuration max-string-length.