🎮Sending Events via Blueprint
Last updated
Last updated
Before following this guide, we recommend downloading this folder from our Mixpanel repository, which contains pre-made assets that you can drop into your map to immediately start sending different test events.
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.
A mixpanel event must contain 2 specific values: an event name, and a set of properties:
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 Request
node to POST your request to the import api: