Custom Events

Custom Events

HTML
<script>
  SP.go('push', 'EVENT_NAME', {
    productId: "PRODUCT_ID", // optional
    // any other params
  });
</script>

Make sure to replace EVENT_NAME with the name of the event defined in the Trustisto panel.

Besides the standard page and basket events, you can send your own events, e.g. newsletter, video_play or contact_form. Custom events can trigger campaigns, add tags and scoring points to the client and be used in Trust Info notifications.

  • EVENT_NAME - name of the event. It is sent to Trustisto in lowercase.
  • productId - optional, links the event with a product
  • other params - any data you want to pass with the event

Client data in events

HTML
<script>
  SP.go('push', 'newsletter', {
    email: "CUSTOMER-EMAIL",
    firstname: "CUSTOMER-NAME"
  });
</script>

If the params contain firstname, city, email, phone or phonePrefix, they are also saved to the client, as with Save Client, but without overwriting values the client already has.

Forbidden names

These event names are reserved and an event with them is rejected:

  • push, get, shuffle, info, pid, stat

The param userData is reserved as well.