Skip to Content
AI Powered Docs! 🤖 These docs are translated with AI, so keep an eye out for minor quirks. We're always improving!
FeaturesEvent Management and Tracking

Event Tracking and Taxonomy

Events form the backbone of Metrix. They tell us what your users are doing in your app or website and how your business is progressing. Properly understanding and implementing events is the key to achieving precise analytics, intelligent segmentation, and effective automation. Remember: “Garbage In, Garbage Out.” The quality of your reports and campaigns directly depends on the quality of the events you send.


1. Types of Events in Metrix

Metrix supports three main types of events to cover all interactions and occurrences on your platform:

  • Custom Events: These are actions that your users perform within the app or website. Examples of these events include: product_viewed (viewing a product), item_added_to_cart (adding an item to the cart), button_clicked (clicking a button), or level_completed (completing a level in a game). You record and send these events using Metrix SDKs.

  • Revenue Events: Revenue Events: This type is a subset of custom events specifically used for tracking financial transactions. Revenue events are crucial for accurately measuring income and calculating the ROI of your marketing campaigns. To record these events, it is mandatory to send the amount and currency attributes along with them. For example: purchase_completed with amount=150000 and currency=IRR.

  • Business Events: Unlike custom events which are triggered by users, business events are occurrences that happen from your backend system, not from direct user interaction. These events typically affect large numbers of users or the entire system, and are not limited to a specific user. Examples: product_discounted (a product was discounted, affecting all users who have viewed that product) or stock_updated (inventory was updated, which could affect product availability for all users). These events are used to enrich your general business data and can only be sent via Metrix’s REST API.

Note: Events such as “order shipped” (order_shipped), even though triggered from the backend, are directly related to a specific user and their actions. It is better to send these as Custom Events (if possible through user-related SDK/API) and link them to the Custom User ID in Metrix so they are associated with the relevant user’s profile. Business Events are designed exclusively for system-wide events with broad impact.


2. Event Attributes: Important Details

Event Attributes are additional contextual information attached to a specific event. They tell Metrix the “what” about that particular event. Without attributes, a “purchase” event only indicates that a purchase occurred, but with attributes, you can track details such as “which product,” “at what price,” “in which category,” and “how many items” were purchased.

  • Importance: Attributes make your raw data usable and analyzable.
  • Data Types: Metrix supports various data types for attributes, including String (text), Number (integer or decimal), Boolean (true/false), and Date (date).
  • Best Practices for Event Attributes:
    • Consistent Naming: Always use fixed and meaningful names for your attributes (e.g., product_name, category, price, quantity). Inconsistent naming complicates data analysis.
    • Privacy Protection: Never send sensitive personally identifiable information (PII) such as credit card numbers, passwords, or security codes in event attributes.
    • Only Essentials: Only send information that you actually need for analysis or activation. Sending too many attributes can lead to complexity and increased data volume.

3. Event Taxonomy: The Roadmap for Your Data

Event Taxonomy is essentially your blueprint for data collection. It is a standardized and organized system for defining and naming all the events and their associated attributes that you plan to track in Metrix. Establishing a solid taxonomy is a critical step before beginning any coding.

  • Why Do You Need a Taxonomy?

    • Data Consistency: Ensures all your teams (development, product, marketing) use a unified language and definition for events.
    • Analyzability: Your data becomes organized and understandable, making analysis much simpler and more accurate.
    • Error Reduction: Developers know exactly which events to send, along with their specific names and attributes.
    • Preventing Chaos: Avoids the creation of duplicate, irregular, or meaningless events that would clutter your dashboard.
  • Elements of a Good Taxonomy:

    • Event Naming: Use a consistent naming pattern, such as object_verb (e.g., user_signed_up, product_viewed).
    • Attribute Definition: For each event, specify all related attributes, including their name, data type, description, and a clear example.
    • Purpose and Use Case: Document the purpose of tracking each event and which teams or departments will use it.
  • Collaboration: Creating an effective taxonomy is typically the result of close collaboration between product, marketing, analytics, and development teams.

Learn more about Tracking Plan and Taxonomy


4. Implementation and Validation

After carefully planning your taxonomy, the next step is to implement the events in your code.

  • Implementation: For detailed guidance on how to send events using Metrix SDKs or APIs, refer to the Technical Guides - SDKs & APIs section and follow the instructions relevant to your platform.
  • Validation: After implementation, thorough testing and validation of the sent events is crucial. Metrix provides tools within its panel under the Onboarding section, allowing you to monitor incoming data and verify its accuracy.

By understanding these concepts and meticulously planning your event taxonomy, you are now prepared to send valuable data to Metrix with precision and effectiveness.

Last updated on