mixpanel_event_definition (Resource)¶
Manages a Mixpanel event definition — the Lexicon entry that documents an event's name, description, and verified status. One resource instance can group multiple underlying event names under a single definition.
Note
Routing note. Unlike most Lexicon (data-definitions) endpoints, the
event-definitions API is mounted only under the project path
(/api/app/projects/{project_id}/event-definitions); Mixpanel exposes no
workspace-scoped variant for it. The provider therefore always uses the
project path for this resource, regardless of whether the project has
workspaces.
Example Usage¶
resource "mixpanel_event_definition" "purchase" {
project_id = 1234567
definitions = [
{
name = "Purchase"
description = "Fires when a customer completes a checkout"
verified = true
},
]
}
Related Resources¶
- mixpanel_event_definition data source — fetches an event definition by ID.
- mixpanel_lexicon_tag — creates tags for categorizing events and properties.
Schema¶
Required¶
definitions(Attributes List) (see below)
Optional¶
event_definition_id(Number)project_id(Number)
Read-Only¶
collect_everything_event_id(Number)contacts(List of String)created_utc(String)custom_event_id(Number)description(String)display_name(String)dropped(Boolean)hidden(Boolean)id(Number) The ID of this resource.last_modified(String)merged(Boolean)merged_event_id(Number)modified_utc(String)name(String)platforms(List of String)status(String)tags(List of String)team_contacts(List of String)verified(Boolean)
Nested Schema for definitions¶
Optional:
collect_everything_event(String) Reference to a Mixpanel-internal "collect everything" event.custom_event(Number) Reference to a custom event ID.description(String) Human-readable description of the event's meaning.name(String) The event name this definition applies to.verified(Boolean) Whether this event definition is marked as verified in Lexicon.
Import¶
Format: PROJECT_ID:EVENT_DEFINITION_ID.