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 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 REST API > Send events via the REST API
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 via the CLI agent
The provided content demonstrates how to send events using the Manufactory agent by passing base64-encoded actor and event objects.
Collecting Events via Websocket > Authentication for the web socket collector
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.