Datasources Collector
The collector is the component responsible for receiving data from outside Reelevant. Alternatively to the datasources in the "worker" mode, datasources using the "ingester" mode can only store data that are coming through this endpoint.
The only datasource type that you can use right now with this endpoint is the "Website Events" one.
Even though we mention website events here, you can send events from any platform (mobile/desktop app for example) as long as its formatted correctly.
To push events, you must the the /collect/{id}/rlvt
where {id}
is the datasource id (that either the support team can provide or alternatively you can just check it inside the datahub app. The schema is the following:
Property | Type | Description |
---|---|---|
key | string | The company id (ex: 61a095fdd8d2e20011544831 ) |
tmpId | string | random identifier that is persisted in the device (for website inside cookie rlvt_tmpId ) for a specific period (ex: ckz2qlmkm00002y8pa227wee9 ) |
eventId | string | random identifier to identify a specific event (ex: ckz89g21600002y91xx7eaj56 ) |
name | string | name of the event (ex: product_page ) |
url | string | the current url, please remove the queries parameters or hash. |
ua | string | the current user agent of the device |
data | Record<string, unknown> | See afterwards for a complete description |
clientId | Identifier of the user performing the action that triggered the event. This specially important since this will be used when finding back what a specific user have seen. | |
v | number (1) | protocol version, please always set this to 1 |
b | string | Opaque string given when user is redirect to the platform by a reelevant workflow (it contains encrypted metadata) |
id | string | Opaque string given when user is redirect to the platform by a reelevant workflow (it contains encrypted metadata) |
timestamp | number | the unix timestamp at which the action has been performed. By default its set the when our backend receive the event but you can set a specific one (for example if you failed to push the event and you need to retry it later) |
The data
property is a dictionary that you can refer it as "labels". There are specific (and so reserved) label that have special behavior.
Label name | Label type | Label description |
---|---|---|
ids | string[] | A list of ids that identify the item if the event relates to a item being bought/seen/like etc (ex: for a purchase this need to contains all product identifiers bought) |
transId | string | If the event relates to a transaction/order, please include the identifier of the said transaction . |
value | number | A value representing the monetary value if the event is related to something that you can buy (ex: for a purchase event we'll indicate the price of the product that have been bought) |
any other label | string | Any labels that need to be attached the the event (ex: for a multi langual website, you may add a label with the local to be able to filter it later). Some label have specific meaning: |