With collections, you can build customized data schemas to match the incoming event data. It is critical to define accurate schemas for your events - we use the AVRO schema to validate each incoming event. If the schema is not defined (or does not match), the event will not be ingested.

How to create collections

Map the schema of the event you want to track

Example of the mapped schema is below. You can read here to learn more about building a tracking plan.

Create the collection

Go to Sources and access the "Collections" tab.

After selecting the tab, you will see the collections created in the source.



Some collections are created automatically when the source is created. The recommend NOT to change any of the collections or their properties that are auto-created as it can break the data flow.

Adding a Collection

Click the "Add collection" and add a corresponding name.

Editing collection name

To edit the collection name, navigate to the three dots icon. From the dropdown, select the "Edit collection name" option to change the name.

Deleting a collection

To delete a collection click on the three vertical dots icon.

Adding a field

To add a field (property), click the plus icon. From the dropdown, select the "Add field". From the appeared side window, you can:

  • Name the field
  • Assign object type
  • Assign field properties

Adding a nested field

NOTE: prior to adding a nested field, you need to have a record or array type fields created in the collection

From the record type field under the three dots dropdown, select the "Add field" option. You can add multiple fields under a single record or array property.

Nested fields can be accessed from the record or array properties by clicking the arrow to expand the view.

Field object types

You can assign a field with one of the following object types:

  • boolean - is true or false values
  • string - text input
  • int - (Integer) for numeric values
  • long - holds signed integers ranging in value from -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807 (9.2...E+18)
  • float - for numeric values with decimals
  • double - for a variable that holds very large (or small) numbers. It can contain up to 15 digits in total, including those before and after the decimal point
  • record - a list of multiple varied type properties within an object
  • array - a list of multiple same-type properties within an object

Key identifiers

To build valid dependencies between the collections, primary and foreign keys must be assigned to the required fields. To add a key, tick the checkbox in the field configuration.

After ticking the required checkboxes, FK (foreign key), key icon (primary key) initials will appear in the field row icon field.

Differences between primary and foreign keys:

  • Primary Key – must be assigned to any field that is always unique within a created collection. This is necessary for giving each entry a unique identifier.
  • Foreign Key - is a field in a collection that refers to the primary key in another collection. The foreign key links collections and allows to use of related collections in the Event editor.

Foreign keys

If you select a foreign key option, you must choose the respective foreign collection and foreign fields that refer to the primary key.

Profile identifier

A primary key that shows that the field belongs to a profile collection. It is used to identify profile collections that create or merge user profiles.

Account identifier

Select fields that will be used as account identifiers - these data objects should have information about the user (e.g., age, location, gender and etc.). If selected, these collection fields will be available to be used in the segment editor - to filter users by their attributes.

User identifier

To identify anonymous cross-channel users, select which collection objects will allow you to identify and merge anonymous users into unified master profiles. To do that, you need to choose a collection field that is a common identifier across different sources. Usually, this field is email, but it can also be a phone, loyalty ID number, etc.

Product identifier

Product identifiers mark which fields are used to describe product-related data, such as price, type of the product, size, etc.