LogoLogo
  • Introduction to the Ebbot Platform
  • Ebbot Platform
  • Bot basics
    • Scenarios
    • Entities
    • Triggers
    • Training center
  • Scenarios
    • Cards and syntax
      • File Input
      • Text card
      • Input
      • Buttons
      • Image
      • File
      • Carousel
      • Location
      • List
      • Contact Agent
      • Rating request
      • Custom component
      • CoBrowsing
    • Transition
    • Card properties
  • AI Insights
    • Setup and Configuration
    • Using the Insights Dashboard
  • EbbotGPT
    • Knowledge
      • Data source transformer
      • Source types
        • File
        • Website scrape
        • Docx file
        • TOPdesk API
        • Sitevision API
        • SharePoint API
          • Create app with Sites.FullControl.All permission in Azure
          • Ebbot SharePoint Postman Guide
        • Confluence API
    • Configurations
    • Persona
    • GPT Evaluation
    • Embedder models
    • EGPT models
  • Custom vocabulary
  • Tutorials
    • Create your first scenario
      • Select a trigger
      • Add bot responses
  • Data Object
  • Release notes
  • For developers
    • Ebbot SDK
    • Safe Exchange API / Vault
    • Subdomain manager
  • EbbotGPT API
  • Chatbot & Live chat
    • Install chat widget
    • Chats API
    • Chat widget API
    • Datasource API
    • Sales tracking for live chat
    • Webhook
      • Incoming webhooks
      • Outgoing webhooks
    • SMS API
      • Authentication
      • Send SMS
      • Errors
      • Encoding
    • Python components
    • Intent detection (NLP)
  • Product guides
    • Product data feeds
    • Install guide
    • Product guide events
      • Product guide user events
      • Received events
      • Send events
    • API & webhooks
    • GA4 integration
    • Klaviyo integration
  • Messenger marketing
    • Install popup
    • API & webhooks
  • Widget cookies & storage
  • For chat agents
    • Ebbot Chat
      • Settings modal
      • Queue
      • Topbar Stats
      • Menu
        • Power-Ups!
        • Quick Replies
  • INTEGRATIONS
    • Ebbot Live Chat in Zendesk
      • Setup guide
    • Active Directory - SAML
    • Configure SAML in Azure
Powered by GitBook
On this page

Was this helpful?

  1. Chatbot & Live chat

Sales tracking for live chat

This sales tracking is for chatbot and live chat. Tracking related to product guides can be found under the Product guides tab.

In order to track sales and add-to-cart events on products that have been recommended in the chat you need to set up your website to send purchase and add-to-cart events to the Ebbot script.

First, you need to add a row of code to the Ebbot script in order to activate the tracking. The following script is the ebbot script with an added row: tracking: true. Don't replace your current script with the one below as it's missing your botId and setting for storage on ovh.

<script>
  window.Ebbot = {
   botId: '<BOT ID>',
    ovh: true / false,
    tracking: true,
    };
   </script>
   <script>!function(t){var e="init-js-widget";if(!t.getElementById(e)){var i=t.createElement("script");i.id=e,i.src="https://ebbot-v2.storage.googleapis.com/ebbot-web/init.js?t="+Math.random(),t.querySelector("body").appendChild(i)}}(document);</script>

These are the available event types: 'ecom-atc' | 'ecom-purchase' | 'ecom-visit'

The type looks like this:

type EventType = 'ecom-atc' | 'ecom-purchase' | 'ecom-visit';
export type EventItem = {
  id: string;
  groupId?: string;
  quantity?: number;
  value: number | string;
};
export type Event<T extends EventType = EventType> = {
  type: T;
} & (T extends 'ecom-atc'
  ? {
      type: 'ecom-atc';
      items: EventItem | EventItem[];
      currency: string;
    }
  : T extends 'ecom-visit'
  ? {
      type: 'ecom-visit';
      items: EventItem | EventItem[];
    }
  : T extends 'ecom-purchase'
  ? {
      type: 'ecom-purchase';
      items: EventItem[];
      currency: string;
    }
  : never);

Once that has been added on your end you can use the following to push the events to the ebbot script:

window.eb_tr.push({type: '<TYPE YOU WANT>', items: [...<LIST OF PRODUCTS>], currency: '<CURRENCY, not required for 'ecom-visit'>'})
PreviousDatasource APINextWebhook

Last updated 3 months ago

Was this helpful?