January 12, 2022
How to fire event via JS
To send a user event to Wooxy.com, you need to properly identify your user and fire an event on your web page.
IMPORTANT: Include those snippets on every page in your app, immediately before the closing </body> tag to initialize JS API and identify your user.
Connecting the library:
<script type="text/javascript" src="//js.wooxy.com/js/v2/JS_SCRIPT_ID.js" charset="UTF-8"></script>
</script>
Contact identificator:
<script type="text/javascript">
let contact = new _wooxyContact('{{identifier}}');
</script>
Step-by-step instructions:
Initialize event object and call “Fire Event” API method:
<script type="text/javascript">
var event = new_wooxyEvent(
'{{eventIdOrName}}',
'{{value}}',
'{{USD}}'
);
contact.FireEvent(event);
</script>
Parameters | |
new_smartSenderEvent(); 'required' | Create event object and add optional attributes in case of need. |
FireEvent(); 'required' | Fire the event to send the data to Wooxy.com. |
customEvent 'required' | Unique eventId or eventName that is already registered in Wooxy system. |
eventValue 'required' | Value in 'FLOAT' or 'INTEGRER' format correspondingly. DOT divider. |
eventCurrency 'optional' | Only EUR or USD. IMPORTANT: Latin uppercase format allowed. No numbers or other symbols allowed. |
IMPORTANT: After making a call the event will be updated in the Events log in a few minutes.