Skip to content

Event Tracking Overview

MarkTag SDK provides three categories of events to comprehensively track user interactions and behaviors on your website or application. Each category serves a different purpose and requires different levels of implementation effort.

Event Categories

1. Automatic Events

What they are: Events that fire automatically when the MarkTag script is added to your site's header. No additional code or configuration is required.

Setup Required: None - they start firing immediately upon script installation.

Purpose: Capture fundamental user behaviors and interactions without any implementation effort.

Examples:

  • mouse_click - User clicks
  • scroll_milestone - Scroll depth tracking
  • rage_scroll - Frustration indicators
  • mouse_movement - User engagement patterns
  • product_zoom - Product image zooming

Platform Usage: Used for basic analytics and engagement tracking.

Learn more about Automatic Events →


2. Pre-defined Events

What they are: Custom events with suggested schemas that are optimized for the Markopolo platform's features. These require frontend implementation but follow standardized patterns.

Setup Required: Frontend code implementation following the suggested schemas.

Purpose: These events are special because Markopolo uses their payload for specific platform logic:

  • ViewItem → Keeps products in knowledge base sync
  • Purchase → Revenue attribution for campaign performance
  • AddToCart → Enables cart abandonment campaigns

Categories:

  • E-commerce: Purchase, AddToCart, BeginCheckout, ViewItem, ViewCart
  • User Actions: Login, Signup, CompleteRegistration
  • Engagement: Search, Share, Subscribe, StartTrial
  • Lead Generation: Lead, SubmitApplication, Contact, Schedule

Platform Usage: Directly integrated with Markopolo's marketing features for campaign optimization, audience building, and attribution.

When to use: Implement these events to unlock the full potential of Markopolo's advertising and analytics features.

View all Pre-defined Events →


3. Custom Events

What they are: Events you define with any payload structure based on your specific business needs. Complete flexibility in naming and data.

Setup Required: Frontend code implementation with your custom schema.

Purpose: Track behaviors and metrics specific to your business that aren't covered by automatic or pre-defined events. These events:

  • Appear in your analytics dashboard
  • Can be used for custom reporting
  • Are NOT used by Markopolo for platform-specific features

Examples:

  • recipe_saved for a cooking app
  • workout_completed for a fitness app
  • document_exported for a SaaS tool
  • level_unlocked for a gaming platform
  • feature_toggled for feature usage tracking

Platform Usage: Analytics and reporting only - not integrated with marketing features.

When to use: When you need to track unique interactions for analytics that don't fit pre-defined event schemas.

How to implement Custom Events →

Event Categories Comparison

Event TypeSetup RequiredUsed by Platform FeaturesFlexibility
AutomaticNone - fires immediatelyBasic analyticsNone - predefined
Pre-definedFrontend implementationYes - marketing features, product sync, optimizationSchema suggested but extensible
CustomFrontend implementationNo - analytics onlyComplete - any name, any payload

Quick Implementation Guide

Basic Event Logging

javascript
// Pre-defined Event Example (Platform-optimized)
mtag("event", {
  type: "Purchase",
  email: "customer@example.com",
  value: 99.99,
  currency: "USD",
  products: [
    {
      id: "SKU-123",
      name: "Product Name",
      price: 99.99,
      quantity: 1,
    },
  ],
});

// Custom Event Example (Analytics only)
mtag("event", {
  type: "recipe_favorited",
  recipe_id: "RCP-456",
  recipe_name: "Chocolate Cake",
  category: "Desserts",
});

Best Practices

  1. Start with Automatic Events - They're already tracking, so review what data you're getting for free

  2. Implement Key Pre-defined Events - Focus on events that match your core business activities:

    • E-commerce sites: Purchase, AddToCart, ViewItem (for product sync)
    • SaaS platforms: Signup, StartTrial, Subscribe
    • Content sites: ViewContent, Share, Search
    • Lead Gen: Lead, Contact, SubmitApplication
  3. Understand Platform Integration - Pre-defined events unlock specific features:

    • ViewItem → Product catalog synchronization
    • Purchase → Revenue attribution for campaigns
    • AddToCart → Cart abandonment campaigns
  4. Add Custom Events for Analytics - Create custom events for metrics not covered by pre-defined events

  5. Include User Identifiers - Always include email or phone when available for better user tracking

Event Data Flow

Important Note for Partners API Users

TIP

If you're using Markopolo only through the Partners API for analytics (not using the full marketing platform), pre-defined events may not be as relevant since you won't be using marketing features like campaign optimization or product sync. You can use custom events with any schema for your analytics needs.

Next Steps