Skip to content

Send events via the web socket

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 using event.
  • 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"
}

Collector > Collecting Events via Websocket

A real-time bidirectional communication system that enables data collection through various methods including REST API, websocket connections, and CLI agents for seamless event transmission and actor interaction.

Websocket > Connect to our Web Socket Server

After establishing a websocket connection with Manufactory Collector, users need to authenticate by sending a message containing their org ID, project ID, actor profile ID, and client UUID to pair the connection with the client.

Agent > Send events via the CLI agent

Events can be sent through the Manufactory agent by providing base64-encoded actor and event objects containing the required attribute-value pairs according to their respective schemas.

Rest Api > Send events via the REST API

Actor profiles can be transmitted by sending a POST request to the /events endpoint with required fields including organization ID, project ID, actor profile object, and attributes object containing specific data values.