Skip to Content
The Makinari API repo now includes an MCP Server — connect your AI models directly. View on GitHub →

Quick Reference

Main Methods

// Initialization and configuration window.MarketFit.init(config) // Widget control window.MarketFit.toggleChat() window.MarketFit.hideWidget() window.MarketFit.showWidget() window.MarketFit.reset() // Chat functions window.MarketFit.openChatWithWelcomeMessage(message, options) window.MarketFit.openChatWithTask(options) window.MarketFit.sendChatMessage(content) window.MarketFit.setChatWelcomeMessage(message) // User identification window.MarketFit.identify(leadInfo) // Consent and tracking window.MarketFit.setConsent(consentType, granted) window.MarketFit.trackEvent(eventName, properties) window.MarketFit.trackPageView(pageData)

Accessible Properties

// Main objects window.MarketFit.chat // Chat object window.MarketFit.consent // Consent object // Configuration properties window.MarketFit.chatTitle // Chat title window.MarketFit.welcomeMessage // Welcome message

Chat Object Methods

// State and conversations window.MarketFit.chat.isEnabled() window.MarketFit.chat.getState() window.MarketFit.chat.getConfig() window.MarketFit.chat.hasConversations() window.MarketFit.chat.getConversations() // State control window.MarketFit.chat.minimize() window.MarketFit.chat.maximize() window.MarketFit.chat.remove() // User information window.MarketFit.getCurrentUser() window.MarketFit.hasIdentifiedUser() window.MarketFit.clearUserIdentity()

Complete Widget Methods List

MethodDescriptionParameters
init()Initializes the systemconfig: object
identify()Identifies the userleadInfo: object
openChatWithWelcomeMessage()Opens chat with messagemessage: string, options?: object
openChatWithTask()Opens chat with taskoptions: object
toggleChat()Opens/closes the chat-
sendChatMessage()Sends messagecontent: string
setChatWelcomeMessage()Changes default messagemessage: string
hideWidget()Hides the widget-
showWidget()Shows the widget-
reset()Resets the widget-
setConsent()Sets consenttype: string, granted: boolean
trackEvent()Records eventname: string, properties?: object
trackPageView()Records page viewpageData?: object
Last updated on