To send a user event to SmartSender.io, 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.smartsender.io/js/v1/JS_SCRIPT_ID.js> </script>
Contact identificator:
<script type="text/javascript"> var contact = new_smartSenderContact('{{identifier}}'); </script>
Step-by-step instructions:
- Install JS API
- Create and generate a JS code snippet.
- Initialize event object and call “Fire Event” API method:
<script type="text/javascript"> var event = new_smartSenderEvent( '{{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 SmartSender. | |
customEvent'required' |
Unique eventId or eventName that is already registered in SmartSender 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.