HiveMP Event Tracking Quickstart

How did we do?

HiveMP Event Tracking provides you with a near real-time event streaming and reporting solution that you can use for any purpose. This quickstart will guide you through creating a new event type to report events into, and then sending events from your game or application.

Create a new event type

  1. Log into the Admin Console.
  2. Open Event Types by clicking on Event Tracking in the navigation menu.
  3. Click Create Event Type.
  4. Type the name of the event type you want to create, for example "MyTestEvent". This name can not be changed later.
  5. Enter a description for the event type.
  6. Click Create.

Create a new event type version

When your event type is first created, it won't have any versions. You need to create a version to send events to it.

  1. If you are not directly following on from the previous section in this guide, locate the event type you want to add the version for under Event Types and click Edit.
  2. Click Create New Event Type Version.
  3. Enter change notes that describe this version. If this is the first version for this event type, you can just enter "Initial version".
  4. Click Add field.
  5. For the field name, type "test".
  6. For the field type, select Text (UTF-8).
  7. Click Create.
  8. On the next screen, wait until the event moves into an available status.

Send an event

You can now send an event to HiveMP Event Tracking:

read -r -d '' _request_body << EOM
{
  "test": "My test event data"
}
EOM
curl -s \
  -H "X-API-Key: $apiKey" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data "$_request_body" \
  -X PUT \
  "https://event-api.hivemp.com/v1/event/insert"\
"?eventType=MyTestEvent"\
"&eventTypeVersion=MyTestEvent"

You'll receive a value of true from this endpoint if the event data was ingested into HiveMP Event Tracking successfully. If so, you can then analyse your event data as outlined in Analysing stored events.

Further reading