Webchat: JavaScript API, embed attributes and Google Analytics events
Omnifox.open, close, toggle, isOpen, identify and logout; data-* embed attributes; events for GA4 and Tag Manager.
Watch this step in the video · JavaScript API and attributes
Methods (once the widget has loaded, or with the command queue):
Omnifox.open(),Omnifox.close(),Omnifox.toggle(),Omnifox.isOpen()Omnifox.identify({...})(see secure identification) andOmnifox.logout()(forgets the visitor; use it on sign-out).
Embed code attributes (they override the settings on that page only): data-color, data-position (bottom-left/bottom-right), data-name, data-greeting, data-locale (es/en/pt), data-auto-detect="false", data-proactive-greeting, data-proactive-key, data-proactive-delay, data-visitor (name/email for the radar, unverified).
Events: the widget sends omnifox_widget_loaded, omnifox_widget_opened, omnifox_conversation_started and omnifox_message_sent to your site's dataLayer/gtag, with the widget key. Use them in GA4 or Google Tag Manager to measure conversions that start in the chat.
Related articles
-
WhatsApp (Meta) error codes: what they mean and what to do
A table of the most common Meta error codes when sending on WhatsApp (131026, 131047, 131049, 130497, 141006, 131031, 131056, 132000, 190, 368…) and how to fix each one.
-
How to connect Telegram
Connect a Telegram bot to your Omnifox inbox in minutes using BotFather.
-
Instagram and Facebook comments: reply and moderate from Omnifox
See and answer comments on your Facebook and Instagram posts and ads, publicly or privately, and set up automatic replies.
-
Sending and receiving videos on each channel: formats and size limits
Which videos you can send and receive on WhatsApp, Instagram, Messenger, Telegram, web chat and email, the real size limits, and what to do with a large video.
-
Move from WhatsApp QR to Coexistence or Cloud API
Once you're done testing with the QR code, move your number to the official connection: no caps, with templates and broadcasts, and no volume-based ban risk.