Send Events from Unreal
Overview

In order to send events from your packaged editor, you should use the/import mixpanel ingestion api (documentation found here). The url is either:
- https://api.mixpanel.com/import, or:- https://api-eu.mixpanel.com/import
 
depending on the location you selected for your data storage.
Blueprint Implementation for Sending Mixpanel Events 
A mixpanel event must contain 2 specific values: an event name, and a set of properties:
{
  "event": "Signed up",
  "properties": {
    "time": 1618716477000,
    "distinct_id": "91304156-cafc-4673-a237-623d1129c801",
    "$insert_id": "29fc2962-6d9c-455d-95ad-95b84f09b9e4",
  }
}In properties, you must include:
- time(of when the event was sent)
- distinct_id(to identify unique users)
- $insert_id(a unique id for the event)
We have a number of helpful json nodes to help you construct this in blueprints. To get started:
- Construct a Json object, and set the above values: 
- You can add additional properties alongside the required fields, which can contain important metadata that you might want to retrieve from a particular event: 
- To complete setting up the request body, create a new Json Object from a custom Mixpanel event struct (this will only contain a string member named event). 
- You can then set the properties field on this new json object, as shown below (note: the api body must be in the form of a json array as each request can accept up to 2000 different events): 
- Finally, set up the required authorization header. You should copy the previously stored basic auth value generated from your project token and use this in this step. Use the - Send Http Requestnode to POST your request to the import api:
Full Blueprint Example
Last updated
Was this helpful?

