Analytics

Analytics

How Analytics Work

Plandalf analytics convert user actions into activities that are then aggregated into your analytics dashboard. Here's how the process works:

1. Tracking User Actions

Start by tracking specific actions in your billing workflow. Each tracked action becomes an activity in your analytics:

Billing Flow
javascript
// User enters billing flow
plandalf.intel.action('entry', {
  flow: "upgrade-button",
  placement: "editor-overlay",
  scenario: "first-time"
});

2. Activity Processing

When an action is tracked:

  • A new activity record is created
  • The activity is enriched with metadata
  • The activity is processed in real-time
  • Activities are aggregated into insights

Supported Event Types

Plandalf supports the following analytics events:

Entry Events

Entry events mark the beginning of a potential flow. They track when a user encounters a trigger point (like a paywall or upgrade button) but haven't actively engaged yet. This helps measure exposure and potential reach.

javascript
// Track when user encounters a paywall
plandalf.intel.action('entry', {
  flow: "premium_features",
  placement: "in_app",
  scenario: "usage_limit",
  element: "pro-features-wall",
  restriction: {
    reason: "usage_limit",
    message: "You've reached your template limit",
    current: 45,
    limit: 50
  }
});

Start Events

Start events indicate active user engagement with a flow. They're triggered when a user takes an action to begin the process, like clicking an upgrade button. This marks the true beginning of user engagement.

javascript
plandalf.intel.action('start', {
  flow: "premium_features",
  element: "upgrade-button"
});

Comparison Events

Comparison events track how users evaluate options. They should be called each time the user modifies their selection or filters, allowing you to track the full decision-making process. Each new comparison overwrites the previous state.

javascript
plandalf.intel.action('comparison', {
  element: "upgrade-today-grid",
  renew_interval: "P1Y",
  currency: "AUD",
  variant_filters: {
    billing: "annual",
    team_size: "small"
  }
});

Transaction Events

Transaction events capture purchase attempts and updates. Call this event whenever the transaction details change (quantity updates, plan changes, etc.). Like comparison events, each new transaction event represents the current state.

javascript
plandalf.intel.action('transaction', {
  id: "checkout_123",
  items: [{
    id: "plan_xxx",
    quantity: 12
  }],
  currency: "USD",
  intent: "upgrade"
});

Complete Events

Complete events mark the successful end of a flow. This should be called once when the flow reaches its intended outcome (like a successful purchase). This event closes the current flow.

javascript
plandalf.intel.action('complete', {
  result: "transaction_successful",
  flow: "premium_features",
  scenario: "usage_limit"
});

Cancel Events

Cancel events indicate that a flow was abandoned or stopped before completion. Like complete events, this closes the current flow but indicates an unsuccessful outcome.

javascript
plandalf.intel.action('cancel', {
  type: "navigate",
  reason: "user_exit",
  element: "close-button"
});

Error Events

Error events track failures during a flow. Unlike cancel events, errors don't necessarily end the flow - they indicate issues that might need resolution.

javascript
plandalf.intel.action('error', {
  message: "Payment verification failed",
  reason: "card_declined"
});

Interaction Events

Interaction events track specific user actions within a flow that don't change the overall state. Use these for UI interactions like navigating between pages in a walkthrough or toggling options that don't affect the comparison/transaction.

javascript
plandalf.intel.action('interaction', {
  scene: "pricing-page",
  element: "currency-selector",
  value: "EUR"
});

Custom Events

Custom events allow tracking of any additional data points that don't fit the standard events. Use these for specialized metrics or unique flow requirements that are hard to measure with standard events.

javascript
plandalf.intel.action('custom', {
  type: "feature_comparison",
  feature: "api_access",
  duration_ms: 5000
});

3. Dashboard Visualization

Your dashboard automatically updates to show:

  • Complete funnel visibility across all steps
  • Real-time conversion monitoring
  • Drop-off points and bottlenecks
  • Revenue impact of each step

Key Metrics Tracked

The analytics dashboard provides several key insights:

MetricDescriptionExample
Conversion RatePercentage of users completing each step68.5% completed pricing
Drop-off PointsWhere users leave your funnel15.2% leave at pricing
Revenue ImpactFinancial effect of each step$5.2k lost at checkout
User PatternsCommon paths through your funnel72% view pricing first

Best Practices

  1. Design Your Flow

    • Map out your unique billing workflow
    • Identify key interaction points
    • Determine which events make sense where
    • Remember flows can be non-linear
  2. Track Experiments

    • Use the scenario key to differentiate variants
    • Compare different workflow designs
    • Test different entry points and placements
    • Track impact of UI/UX changes Example:
    javascript
    // Variant A: Direct upgrade button
    plandalf.intel.action('entry', {
      flow: "upgrade",
      scenario: "direct_cta",
      placement: "header"
    });
    
    // Variant B: Feature-triggered upgrade
    plandalf.intel.action('entry', {
      flow: "upgrade",
      scenario: "feature_triggered",
      placement: "in_app"
    });
    
  3. Maintain Flow Context

    • Keep flow and scenario consistent within a session
    • Use interaction events for minor UI updates
    • Call comparison/transaction events when state changes
    • End flows explicitly with complete/cancel
  4. Measure What Matters

    • Focus on events that impact conversion
    • Track user decision points
    • Monitor error and drop-off patterns
    • Use custom events for unique insights

Next Steps

After implementing analytics:

  1. Set up your dashboard views
  2. Configure alerts for key metrics
  3. Start A/B testing improvements
  4. Monitor revenue impact

Need help setting up analytics for your custom implementation? Contact our team for support.