Website events
After installing the widget and obtaining the required consent, call track when the user performs an action:
js
await window.FlowtomateWidget.ready();
window.FlowtomateWidget.track('report_created', {
report_type: 'sales',
rows: 120,
shared: false
});The method returns void. A call does not confirm that the event was queued, sent, or delivered. Check the result in “Events” and the audience profile.
Name and properties
The widget trims whitespace from both ends of the event name and converts it to lowercase. After that, the name must start with a Latin letter, contain only Latin letters, digits, and _, and be no longer than 100 characters. Do not use system names or the prefixes flowtomate_, popup_, checklist_, tour_, page_, session_, survey_, feedback_, and hint_.
An event can have up to 50 properties. A property name starts with a Latin letter; subsequent characters may be uppercase or lowercase Latin letters, digits, and _. The name must be no longer than 100 characters. A value can be:
- a string of up to 2,000 characters;
- a finite number,
true,false, ornull; - an array of up to 50 strings or up to 50 finite numbers; strings in an array are also limited to 2,000 characters.
Nested objects and mixed arrays are not supported. The browser accepts JSON.stringify(properties).length of no more than 32,768 JavaScript characters; the server also limits the serialized event to 32,768 characters, including context. Keep properties well below that threshold. If the name or properties break a rule, the widget may discard the event without an error from the track call.
Do not send passwords, tokens, card details, or other secrets. Properties named password, passwd, secret, token, authorization, card_number, cvv, and cvc are prohibited. Send email and name through identify or setTraits when you have a basis and consent to do so. See the main guide for identification rules.
Consent and delivery
With denied, the widget clears the queue and does not add new events. In “Only with consent” mode, a call made before granted is not saved for later delivery. After consent, call track again for a new action; the old event will not appear automatically.
When collection is allowed, the widget sends up to 20 events in a batch of up to 128 KiB. The local queue is limited to 1,000 events, 5 MiB, and seven days; for temporary network errors, the widget retries with a delay between one second and five minutes. This is not a log with guaranteed delivery: do not use track for payments or commands with irreversible effects.
Event context contains the page address without query parameter values, query parameter names, and some device information. Cookie values are not included in the event. When loading settings, the widget may send query values and cookies accessible to JavaScript for display conditions. This separate request is described in the privacy rules.
To verify, open DevTools → Network on a test website, trigger an event after consent, and wait for normal delivery. Then find it in “Events”. If there is no record, check troubleshooting.