mixpanel_custom_event (Resource)¶
Manages a Mixpanel custom event (mixpanel_custom_event) — a compound event definition that groups related raw events (alternatives) under a single named event for analysis.
Example Usage¶
resource "mixpanel_custom_event" "purchase" {
project_id = 1234567
name = "Purchase"
alternatives = jsonencode([
{ event = "checkout_complete", serialized = "checkout_complete" },
{ event = "order_confirmed", serialized = "order_confirmed" }
])
}
Schema¶
Optional¶
alternatives(String)customevent_id(Number)name(String)project_id(Number)share_with_project(Boolean) Whether to share this entity with the whole project after creation. Entities created by a service account are otherwise visible only to that service account. Defaults totrue. See the Entity sharing guide.
Read-Only¶
custom_event(Attributes) A custom event definition (JSON). Additional keys returned by the API are preserved. (see below for nested schema)
Nested Schema for custom_event¶
Read-Only:
alternatives(Attributes List) (see below for nested schema)deleted(Boolean)id(Number)is_collect_everything_event(Boolean)is_visibility_restricted(Boolean)name(String)project_id(Number)user_id(Number)
Nested Schema for custom_event.alternatives¶
Read-Only:
event(String)serialized(String)
Import¶
Custom events can be imported using the composite PROJECT_ID:ID format: