Webhooks on Goals

Webhooks on Goals help you measure your AI’s performance beyond MagicBlocks.

Each time your AI Agent completes a defined goal (like Lead Captured, Demo Booked, or Order Confirmed), MagicBlocks fires a webhook event containing all relevant data — including user info, timestamps, and goal details.

This data can then be used in tools like Google Analytics, HubSpot, Notion, Zapier, or your internal dashboards to measure conversions, campaign ROI, and customer engagement.

When to Use

Use Webhooks on Goals when you want to:

  • Send AI goal completions to external systems in real time.
  • Measure how many conversions your AI drives per day, campaign, or channel.
  • Trigger automations when a goal is achieved (e.g., “send Slack notification” or “update CRM lead”).
  • Combine AI data with broader business analytics.

How It Works

Need setup help? See:
Integrate Webhooks with MagicBlocks →

Once your webhook is connected, MagicBlocks automatically sends data whenever selected events occur.

Available Webhook Events

When creating or editing a webhook, you can select from the following event types:

Event

Description

Typical Use

Lead updated

Fires when a user’s lead info changes.

Update CRM or send to sales team.

Session start

Fires when a chat session begins.

Track conversation starts per channel.

Session end

Fires when a session closes.

Log session duration or outcomes.

Form completed

Fires when a form is submitted.

Send form data to CRM or Google Sheets.

Goal completed

Fires when a MagicBlocks Goal is achieved.

Record conversions, purchases, or signups.

Measuring Goal Performance

Once your webhook is active, you can track all goal events under Library › Webhooks › Webhook History.

Each log entry includes:

  • Event Name (e.g., goal_completed)
  • Session ID & Agent ID
  • Status (Pending, Success, Retry, Error)
  • Retry Count (up to 3 automatic attempts)
  • Sent / Received timestamps

Use this data to measure:

  • Goal conversion volume
  • Response reliability (success rate)
  • Average delay between trigger and delivery
  • Trends across agents, campaigns, or time periods

Tip: You can click View Log to inspect the full JSON payload and confirm which data fields are being transmitted.

Example

When your AI triggers a Goal completed event called “Free Trial Signup,” MagicBlocks sends a structured JSON payload. Your receiving system (for example, HubSpot or Zapier) logs this event instantly, allowing your sales or analytics team to act or report on it.

Real-World Use Cases

For Marketing & AI Agencies

  • Client Reporting Automation:
    Agencies can automatically forward all “Goal Completed” events to Google Sheets or Data Studio to generate client performance dashboards.
  • Cross-Platform Attribution:
    Combine MagicBlocks conversion data with ad platform metrics (Meta Ads, Google Ads) to show total funnel performance.
  • Automated Notifications:
    Use Zapier or Slack to alert account managers each time a client’s AI Agent books a meeting or captures a lead.

For SaaS & B2B Businesses

  • Trial Conversion Tracking:
    Send goal_completed events to GA or your CRM whenever a user starts a free trial via AI.
  • Sales Follow-up Automation:
    Connect MagicBlocks → HubSpot → assign leads automatically when the AI books demos.
  • User Retention Measurement:
    Trigger webhooks on Session End events to log returning vs. new users.

For eCommerce

  • Order Confirmations:
    Send “Goal Completed: Order Placed” events to Google Analytics or ERP systems for conversion tracking.
  • Cart Recovery:
    Trigger webhooks when Session End occurs without a purchase — notify marketing automation tools to follow up.
  • Product Insights:
    Sync form data (e.g., color, size, or preferences) into analytics dashboards for trend analysis.

Best Practices

  • Keep Webhooks Active only when endpoints are verified and stable.
  • Use clear goal names for easy tracking (e.g., “Webinar Registered”, not “Goal 1”).
  • Test each webhook before publishing your AI Agent.
  • Combine Webhook History + Dashboard data for a complete performance view.
  • Review retry logs weekly — fix endpoints for failed deliveries.

 

 

 

Was this article helpful?