Search through more than a hundred articles on every aspect of User.com

Andrzej Pacholik
Written by Andrzej Pacholik

Action module: Send data

Learn how to send custom data to a user widget


This action allows you to send any custom data to a user widget. This data may be handled later using the widget callback method `onPayloadReceived`. You may define your own function that will handle incoming data during widget initialization, e.g.:


javascript
UE.pageHit({
onPayloadReceived: function(message) {
console.log(message);
}
});

We use templates for data so you can use context tags that will be replaced by user attributes for which the action was called, e.g. receiver.name or receiver.last_seen, much the same as in our email templates.

Categories: