mixpanel@v1

Push event to Mixpanel.

Versionmixpanel@v1
Runs ininbound-call and your own branches · api-initiated and inbound-sms · hangup, postHangup and events.ready

Parameters

NameTypeRequiredDefaultDescription
usernamestringyesUsername of your Mixpanel service account.
1..255 characters
secretstringyesSecret of your Mixpanel service account.
1..255 characters
project_idstring or integeryesID of your Mixpanel project.
eventstring"Call"Name of the event.
1..255 characters
propertiesobjectProperties of the event. They are added to the ones Callr sets (fromNumber, toNumber, scenarioName...) and override them.

Every parameter that accepts ${{ }} can be computed from an expression.

How it works

To push events to Mixpanel, you need to create a Service Account on your project, with the Admin role. https://developer.mixpanel.com/reference/service-accounts https://developer.mixpanel.com/reference/import-events

You can override these properties by specifying them in the properties object.

Mixpanel events are pushed asynchronously, so the action returns immediately.

Examples

example

- action: mixpanel@v1
  params:
    username: dev.4242.mp-service-account
    secret: ${{ secrets.MIXPANEL_SECRET }}
    project_id: 2843842
    event: Call # choose a name for your event
    properties: # optional
      customProperty: whatever value
      anotherProperty: ${{ JSON.stringify(42) }}
# The properties object is optional. We prefill the following properties:
# time: timestamp in ms
# distinct_id: call.fromNumber
# $insert_id: sprintf('call-%d', call.id)
# fromNumber: call.fromNumber
# fromCountry: call.fromCountry
# fromType: call.fromType
# toNumber: call.toNumber
# toCountry: call.toCountry
# toType: call.toType
# scenarioName: scenario.name
# direction: call.direction
# mp_country_code: call.fromCountry
# $city: call.fromLocation

Did this page help you?