After establishing a web socket connection, we can start sending user’s generated events via the open channel.
Required keys
type
(required) string - The message type, in this case we will be usingevent
.attributes
(required) object - Pairs containing attribute name and the corresponding value while considering the correct attribute names and data types. Please refer to get events schema .
Websocket message example
{
"type": "event",
"attributes": {
"event_name": "login",
"event_type": "user-actions",
"made_purchase": false
}
}
Websocket reply example
{
"type": "event",
"status": "ok"
}
Related articles
Collecting events via REST API > Send events
The endpoint POST /events
allows sending actor profiles with the required keys of org_id
, project_id
, actor_profile
, and attributes
, considering the correct attribute names and data types from the corresponding schemas.
Collecting events via our CLI agent > Send events
The provided content demonstrates how to send events using the Manufactory agent by passing base64-encoded actor and event objects.
Collecting Events via Websocket > Connect to our Web Socket Server
The websocket connection is authenticated using the actor profile ID and client UUID obtained after successful authentication, allowing the sending of actor-generated events.
Collecting Events via Websocket > Authentication
Authentication is required to send data to Manufactory via a web socket, which can be done using the POST /auth endpoint with the project key, org ID, project ID, and actor profile details in the request header and body.