Context.ai
  • What is Context.ai?
  • List of Trackable Metrics
  • Product Analytics
    • Overview
    • Topic Categorisation
      • LLM Topics
    • User Engagement Tracking
    • Foreign Language Support
    • PII Filtering
    • Custom Metadata Filtering
    • Backfill Analytics Data
    • Custom Events
    • API Ingestion Methods
      • Log Conversation
      • [deprecated] Upsert Conversation
      • Thread Conversation
      • Patch Thread Message
      • API Resources
        • Chat Message
        • [deprecated] Tool Message
        • Custom Event
        • Metadata
        • Conversation
        • Thread
    • Embedded API
      • Multi-Tenancy
      • Conversations
        • Series Data
  • Integrations
    • Getting Started
    • Python SDK
    • Javascript SDK
    • LangChain Plugin
    • Haystack Plugin
    • Authorization
Powered by GitBook
On this page

Was this helpful?

  1. Product Analytics

Custom Events

Support additional custom event types inline within transcripts.

PreviousBackfill Analytics DataNextAPI Ingestion Methods

Last updated 10 months ago

Was this helpful?

Transcripts may often include other important events, such as conversions, link clicks, or other interactions with your application. You can use custom events in Context.ai to track, record and correlate these events with topics or other attributes.

These custom events will appear inline in the Context.ai dashboard, where you can use the filtering and graphing functionality to

Ingesting Custom Events

Custom events can be included alongside regular messages during ingestion, identified as custom events by including "type": "event" in the message payload. All custom events have two relevant fields you can use to tailor to your usecase:

  • Name: Used to uniquely identify the 'type' of the event. For example, if you are measuring checkout events for an e-commerce chatbot, you could populate this field with "Checkout".

  • Metadata: Attach a number of key-value pairs to include additional arbitrary data that is helpful to understand additional context about the event. For example, for a "Checkout" event you may want to attach a product_id metadata attribute that contains the ID of the product that was purchased.

{
   "type": "event",
   "name": "Checkout",
   "metadata": {
     "product_id": "p_39gsndf3ksh",
     "payment_method": "card",
   }
}

All ingestion methods except support custom events. If you want to ingest conversations that include custom events and are using upsert, you should first migrate to using the (recommended) or the .

Upsert
Threads ingestion method
Log ingestion method