# Event registry for Acme Reports (fictional). A planning record, not vendor configuration.
# Full contracts (trigger, must_not_fire, identifiers, tests) live in the tracking plan.
registry_version: 3
naming_rules: martech-context/naming-rules.md
vocabulary:
  objects: assets/example-acme-objects.txt
  actions: assets/actions.txt
spelling: us_english
boundaries: {backend: "2026-11-03T08:00:00Z", web: "2026-11-03T09:00:00Z", ios: 5.8.0}
overlap_evidence: example-acme-review.md section 3 (2026-10-05 to 2026-10-11, daily counts against source tables plus entity-ID joins)
# history_method: merge only for a pair recorded as disjoint; hide when an authoritative series
# has always covered the action; date_split when the new series starts at the boundary;
# none for a semantic change, where the old series is never joined to the new one.

events:
  user_registered:
    display_name: User Registered
    definition: A new person account was committed by the backend.
    unit: one newly registered person
    producer: backend
    properties: {signup_method: string}
    destinations:
      mixpanel: user_registered   # backend source only; the web source's Mixpanel mapping excludes the browser call
      ga4: sign_up   # producer: browser, Track call after the success response, GA4 Cloud Sign Up action (Measurement Protocol); method mapped from signup_method
    key_event: open; decision belongs to the conversion owner (decisions.md)
    lint_exceptions:
      - rule: M04
        reason: Trigger is the committed registration, which matches GA4's sign_up meaning.
        approved_by: Analytics lead
        date: 2026-10-17
    replaces:
      - {old_name: signup_completed, producer: ios, until_version: 5.8.0, overlap: overlapping, authoritative: user_registered, history_method: hide, note: "reports repointed before hiding; display name 'Signup Completed (duplicate, retired)'; older iOS versions excluded from every metric"}
      - {old_name: Sign Up, producer: web, retire_on: 2026-11-03, history_method: hide, note: "fired on click, a different moment, so history is not comparable; reached GA4 as Sign_Up; semantic break annotated"}

  workspace_created:
    display_name: Workspace Created
    unit: one workspace
    producer: backend
    properties: {creation_source: string, workspace_id: string}
    allowed_values: {creation_source: [blank, template_gallery, import]}
    destinations:
      mixpanel: workspace_created   # backend source only
      ga4: workspace_created        # producer: browser after the success response, GA4 Cloud Custom Event mapping, Lowercase Event Name false
    replaces:
      - {old_name: workspace_created_successfully_from_template_gallery, producer: web, retire_on: 2026-11-03, history_method: date_split, note: old name covers template gallery workspaces only}

  report_created:
    display_name: Report Created
    definition: A report definition was saved for the first time.
    producer: backend
    destinations: {mixpanel: report_created}
    replaces:
      - {old_name: Report Created, producer: web, retire_on: 2026-11-03, overlap: overlapping, authoritative: report_created, history_method: hide, note: "reports repointed before hiding; reached GA4 as Report_Created, which stops"}

  report_viewed:
    display_name: Report Viewed
    producer: web
    destinations: {mixpanel: report_viewed}
    replaces:
      - {old_name: page_view, producer: web, retire_on: 2026-11-03, history_method: date_split, note: display name "Report Viewed (legacy)"}

  report_generation_requested: {display_name: Report Generation Requested, producer: backend, join_key: generation_job_id, destinations: {mixpanel: report_generation_requested}}
  report_generation_succeeded: {display_name: Report Generation Succeeded, producer: backend, join_key: generation_job_id, destinations: {mixpanel: report_generation_succeeded}}
  report_generation_failed:
    display_name: Report Generation Failed
    producer: backend
    join_key: generation_job_id
    properties: {error_category: string}
    allowed_values: {error_category: [timeout, source_unavailable, permission_denied, unknown]}
    destinations: {mixpanel: report_generation_failed}

  report_export_requested: {display_name: Report Export Requested, producer: backend, join_key: export_job_id, destinations: {mixpanel: report_export_requested}}
  report_export_succeeded:
    display_name: Report Export Succeeded
    producer: backend
    join_key: export_job_id
    properties: {export_format: string, file_size_bytes: integer}
    allowed_values: {export_format: [pdf, csv]}
    destinations: {mixpanel: report_export_succeeded}
    replaces:
      - {old_name: report_exported_pdf, producer: web, retire_on: 2026-11-03, overlap: disjoint with reportExported, history_method: date_split}
      - {old_name: reportExported, producer: ios, until_version: 5.8.0, overlap: disjoint with report_exported_pdf, history_method: date_split, note: old names after the backend boundary are excluded}
  report_export_failed: {display_name: Report Export Failed, producer: backend, join_key: export_job_id, destinations: {mixpanel: report_export_failed}}

  report_shared:
    display_name: Report Shared
    producer: backend
    properties: {share_method: string}
    allowed_values: {share_method: [link, workspace_member]}
    destinations: {mixpanel: report_shared}
    replaces:
      - {old_name: ga_report_shared, producer: web, retire_on: 2026-11-03, history_method: date_split}

  plan_selected:
    display_name: Plan Selected
    producer: web
    properties: {plan_code: string}
    allowed_values: {plan_code: [starter, pro, enterprise]}
    destinations: {mixpanel: plan_selected, ga4: plan_selected}   # ga4 through the GA4 Cloud Custom Event mapping, Lowercase Event Name false
    replaces:
      - {old_name: plan_selected_pro, producer: web, retire_on: 2026-11-03, history_method: date_split, note: old name covers plan_code pro only}

  onboarding_step_completed:
    display_name: Onboarding Step Completed
    producer: backend
    properties: {step_key: string, step_number: integer}
    destinations: {mixpanel: onboarding_step_completed}
    replaces:
      - {old_name: onboarding_step_3_completed, retire_on: 2026-11-03, history_method: date_split, note: old name covers step 3 only}

  member_invitation_sent: {display_name: Member Invitation Sent, producer: backend, destinations: {mixpanel: member_invitation_sent}, replaces: [{old_name: member_invited, history_method: date_split}]}
  member_invitation_accepted: {display_name: Member Invitation Accepted, producer: backend, destinations: {mixpanel: member_invitation_accepted}, replaces: [{old_name: invite_accepted, history_method: date_split}]}

  subscription_cancellation_requested:
    display_name: Subscription Cancellation Requested
    definition: The account owner confirmed cancellation; the subscription is still active.
    producer: backend
    destinations: {mixpanel: subscription_cancellation_requested}
    replaces:
      - {old_name: subscription_cancelled, producer: web, retire_on: 2026-11-03, history_method: none, note: semantic change from button click to confirmed cancellation; old series read on its own and the break annotated}
    lint_exceptions:
      - rule: N05
        reason: 35 characters, within GA4's 40; shortening would break the subscription_cancellation object.
        approved_by: Analytics lead
        date: 2026-10-17
  subscription_canceled:
    display_name: Subscription Canceled
    definition: The subscription ended and entitlement stopped.
    producer: backend (billing webhook)
    properties: {effective_at: timestamp}
    destinations: {mixpanel: subscription_canceled}
