Events (legacy)
The events every Frontnow Advisor sends by default, for callbacks and Google Analytics.
The Advisor reports what your visitors do in two ways:
Callbacks:
advisor.on(name, callback)calls your function.Google Analytics: the same events go to Google Analytics on your page. See Google Analytics.
Both use the same event names.
Advisor loaded (every page load)
ready
Advisor opened
open
Advisor closed
close
A message was sent (see message)
message
Visitor submitted a typed prompt
prompt-submit
Visitor picked a suggested question
recommended-question
Visitor picked a discovery topic
discovery-topic
Product cards shown in an answer
products-shown
Visitor clicked a link in an answer: a product link to your shop or another link
document-click
Visitor opened a product's details
product-detail-open
The Advisor also sends eoc_open, eoc_close and some interface events (for example header-menu-toggle or stop-generation) to callbacks and Google Analytics. They are not part of this contract and can change.
Google Analytics
If your page has Google Analytics, every event is forwarded automatically with the prefix frontnow:, for example frontnow:document-click.
gtag.js on the page: the Advisor calls
gtag('event', name, params).Google Tag Manager only: the Advisor pushes
{ event: name, ...params }towindow.dataLayer.The Advisor never loads Google Analytics itself and never sends to Universal Analytics (
window.ga). A page with only Universal Analytics gets no events.Frontnow can switch the forwarding off for your Advisor. Callbacks keep working.
Event parameters
Every event carries conversation_id and app_version once they are known. ready and the first open on each page load never carry them, because the chat has not loaded yet.
conversation_id
all events
the chat id; changes when the visitor starts a new conversation
app_version
all events
the Advise version, for example 4.5.5
message_count
message, recommended-question, discovery-topic
messages sent in this conversation so far; 1 = conversation start
product_count
products-shown
product cards shown in that answer
product_ids
products-shown
Frontnow's ids of the cards shown, in order, comma-separated (id1,id2); a product shown twice appears twice. Not your article numbers: those come as customer_product_id with a product click. Left out when longer than 100 characters (about 9 products, Google Analytics limit) and in older Advise versions
message_id
products-shown, document-click (products), product-detail-open
the answer the products belong to; not set for gallery products or before the answer has arrived
product_id
document-click (products), product-detail-open
Frontnow product id
customer_product_id
document-click (products), product-detail-open
your own id for the product, to match it with your own data: the article number from your product feed, or the product page URL if we crawl your catalog. Left out when there is none
surface
document-click (products)
where the visitor clicked: chat (a product in the chat) or detail_sheet (product details)
source
product-detail-open
where the details were opened: product_card, inline_link, search_results or gallery
url
document-click
the link target; left out when it is longer than 100 characters (Google Analytics limit)
document-click carries product_id, customer_product_id, surface and message_id only when a product link was clicked.
Google Analytics never gets the visitor's text.
Measuring conversions
Conversion (click to your shop):
frontnow:document-clickthat has aproduct_id. Withoutproduct_idit is a click on another link. Opening a product's details is not a shop visit.Conversation start: there is no separate event. Count
message,recommended-questionanddiscovery-topicwheremessage_countis1.Counting messages: a typed prompt sends both
messageandprompt-submit. Countmessageand ignoreprompt-submit.Your own buttons:
advisor.sendMessage()also sendsmessage(andopen, if the Advisor was closed). If you already track the click on your button, do not count it twice.readyfires on every page load where the Advisor is set up, without any visitor action.
Setup in Google Analytics and Tag Manager
gtag.js: events arrive in GA4 directly. Register the parameters you need as custom dimensions.
Google Tag Manager: create one Custom Event trigger per event name (with the prefix, for example
frontnow:document-click) and one Data Layer Variable per parameter. Tag Manager keeps the last value of every key, so a parameter that an event does not carry still shows the value of an earlier event. This happens when aurlor theproduct_idslist is too long or missing (older Advise versions), on product events without amessage_idorcustomer_product_id, and on every link click after a product click: both aredocument-click, so the link click still shows the product'sproduct_idandcustomer_product_id. Bind each parameter only on the tag of the event that carries it.sourceis a plain dataLayer key. On Tag Manager pages it overwrites asourcevariable of your own.Tag Manager plus a
gtagfunction on the page (for example for Consent Mode): the Advisor callsgtag. Check in Tag Manager preview how your container receives the events before you build triggers. If your Google tag already forwards these events, do not add a second GA4 event tag for them, or they are counted twice.Consent: the Advisor does not check consent. The consent setup of your page applies to everything the Advisor sends to
gtagordataLayer. Frontnow's own analytics is separate and not covered by it; see our privacy policy.
Callbacks
ready, open, close, eoc_open and eoc_close call your function without an argument. All other events call it with the event data below. The data can contain the visitor's text (value, and message on prompt-submit): do not send it to analytics as it is. The data can contain more keys than listed; rely only on the documented ones.
ready
Triggered when the Frontnow Advisor is initialized, on every page load.
open
Triggered when the Frontnow Advisor is opened.
close
Triggered when the Frontnow Advisor is closed. advisor.close() triggers it only when the Advisor is open.
message
Triggered for every message that starts a turn in the chat: a typed prompt, a tapped answer option or chip, advisor.sendMessage(), or a prompt passed in the page URL. Suggested questions and discovery topics send their own events instead.
prompt-submit
Triggered together with message when the visitor submits a typed prompt.
recommended-question
Triggered when the visitor picks a suggested question: on the start screen of the previous chat design, or a question shown for a product the visitor viewed (context awareness).
discovery-topic
Triggered when the visitor picks a discovery topic on the start screen.
products-shown
Triggered once per answer that shows product cards, when the answer is complete. Not sent for restored conversations or for the product gallery of the previous chat design.
document-click
Triggered when the visitor clicks a link: a product's link to your shop (in the chat or in the product details), or another link in an answer. Only product links carry product_id, surface and message_id.
product-detail-open
Triggered when the visitor opens a product's details: from a product card (product_card), a product link in an answer (inline_link), the search results list (search_results), or the product gallery of the previous chat design (gallery).
Changes to Google Analytics forwarding
These changes come with the current Advisor script and apply to every Advisor, also on older Advise versions:
Events carry parameters in Google Analytics (see Event parameters). Before, the parameters were always empty. Older Advise versions send fewer of them.
Universal Analytics (
window.ga) is no longer used. Pages with gtag.js or Google Tag Manager get the events there. A page with only Universal Analytics gets no events.New events:
products-shownandproduct-detail-open.
From Advise 4.5.5, document-click also carries the product data when a product link was clicked, and opening a product in the gallery sends product-detail-open instead of document-click.
Last updated