Typesense icon

Typesense

Interact with the Typesense search platform

Analytics → Create Analytics Event

AI-generated

Overview

This node interacts with the Typesense search platform to create analytics events. Specifically, the 'Create Analytics Event' operation allows users to log an analytics event corresponding to a specified analytics rule. This is useful for tracking user interactions such as clicks, conversions, queries, and visits within an application or website, enabling detailed analytics and reporting based on user behavior.

Use Case Examples

  1. Logging a 'click' event when a user clicks a button on a webpage.
  2. Recording a 'conversion' event when a user completes a purchase.
  3. Tracking a 'query' event when a user performs a search query.
  4. Capturing a 'visit' event when a user visits a particular page or section.

Properties

Name Meaning
Rule Name Name of the analytics rule this event corresponds to, used to categorize and identify the event.
Event Type Type of analytics event being created, such as click, conversion, query, or visit.
Event Data (JSON) Event data provided as a JSON string. It should include user_id, doc_id (or doc_ids), q (query), and optionally analytics_tag to provide detailed context about the event.

Output

JSON

  • ruleName - The name of the analytics rule associated with the event.
  • eventType - The type of the analytics event created.
  • eventDataJson - The JSON string containing detailed event data such as user ID, document IDs, query, and optional analytics tag.

Dependencies

  • Requires an API key credential for authenticating with the Typesense platform.

Troubleshooting

  • Ensure the 'Rule Name' is correctly specified and corresponds to an existing analytics rule in the Typesense system.
  • Verify that the 'Event Data (JSON)' is valid JSON and includes all required fields such as user_id, doc_id or doc_ids, and q (query).
  • Check that the API key credential is correctly configured and has the necessary permissions to create analytics events.
  • Common error messages may include invalid JSON format errors, missing required fields, or authentication failures. Resolving these involves correcting the JSON structure, providing all required data, and verifying API credentials.

Discussion