What is the dataLayer integration?
The dataLayer integration automatically pushes events to the browser’swindow.dataLayer object when users interact with the Molin AI widget. All events are sent automatically, so no configuration is required on your part.
Custom events
molin_chat_open
Fired when the user opens the chat window.
molin_chat_close
Fired when the user closes the chat window.
molin_message_sent
Fired when the user sends a message in the chat.
molin_link_click
Fired when the user clicks a link inside a Molin AI widget conversation.
molin_lead_collected
Fired when the AI successfully collects a lead (the visitor’s name and contact details) in the chat.
This is the strongest conversion signal the widget emits. Unlike engagement events such as molin_chat_open or molin_message_sent, it fires only when a real lead was captured, so it is the recommended event for conversion tracking and ad campaign optimization.
molin_order_lookup
Fired when the AI finds a customer’s order and shows its details in the chat (order status, tracking, items). A useful signal for measuring support automation.
molin_live_chat_requested
Fired when the AI successfully starts a live chat request, escalating the visitor to a human support agent. It does not fire when agents are unavailable or the request fails.
molin_product_review_shown
Fired when the AI shows customer product reviews in the chat.
GA4 e-commerce events
The widget also pushes standard GA4 e-commerce events so that AI-driven product recommendations appear natively in your Google Analytics e-commerce reports.view_item_list
Fired when the AI recommends products in the chat. Each product is included as an item.
select_item
Fired when the user clicks on a product card link. Identifies which product was selected from the recommendation list.
view_item
Fired alongside select_item when the user clicks a product card link. This event is used by GA4 to track product detail views.
E-commerce item fields
The
price field may be 0 in some cases. We are still upgrading our internal price parsing logic to cover all catalog formats reliably.Technical note
Before each e-commerce event, the widget pushes
{ ecommerce: null } to clear the previous e-commerce object, following Google’s recommended practice.