Tracking
Custom Notificator
HTML
<script>
window.SOCIALPROOF_NOTIFICATOR = {
isAvailable: function () {
return true;
},
setStyleConfig: function (styleConfig) {},
setTiming: function (timing) {},
forEvent: function (event) {
return event.name === 'buy';
},
notify: function (event, text, image, link, brandless, id) {
// render the notification your own way
}
};
</script>Trust Info notifications are rendered by Trustisto. If you want to render them in your own way, e.g. inside your page layout, define a custom notificator: an object in window.SOCIALPROOF_NOTIFICATOR. Trustisto still decides when a notification is shown and what it says; your notificator decides how it looks.
Define it before the initialization snippet.
isAvailable()- returntrueto use the custom notificatorsetStyleConfig(styleConfig)- called once at start with the notification style set in the panelsetTiming(timing)- called once at start with the notification timing set in the panelforEvent(event)- returntrueif the custom notificator should show the notification for this event; forfalseTrustisto shows its own notificationnotify(event, text, image, link, brandless, id)- show the notification:event- the event datatext- the notification message, as HTMLimage- URL of the image, if anylink- URL the notification should link to, if anybrandless-trueif the “by Trustisto” branding should be hiddenid- ID of the notification