External events integration through JavaScript

Thanks to external events, we can send additional information about the contact from external systems to SALESmanago. The most popular way to use external events in eCommerce is to send information about purchases (external event: purchase) or abandoned carts (external event: cart) made by the contact. This information can be used to:

  • collect transaction data – it’s necessary to analyze data in the eCommerce Analytics Dashboard,
  • avoid lost sales as a result of an abandoned cart,
  • send an email, which thanks your client for purchases,
  • the advanced automatic contact segmentation based on the purchase information sent to our system.

Of course, there are other types of external events, that you can use and adjust to your needs. These are:

  • VISIT,
  • PHONE_CALL,
  • RESERVATION,
  • CANCELED,
  • ACTIVATION,
  • MEETING,
  • OFFER,
  • DOWNLOAD,
  • LOGIN,
  • TRANSACTION,
  • OTHER.

External events can be send through the API. More information about this, you can find here >>

Another way of transferring external events, is the ability to sent them through JavaScript. Using this option, you don’t need to do it by API.

IMPORTANT: types of external events have to be always capitalized.


SENT EXTERNAL EVENTS THROUGH JavaScript

[ Step 1.] Monitoring code change on your website – you should implement new monitoring code (find it below). Remember to modify the value in “var _smid =” to your individual client ID.

2

IMPORTANT: It is necessary to double check If the code looks exactly the same as before pasting. It often happens that the code modifies. The code will not work If even small detail has been changed.

Your individual Endpoint and Client ID is in SETTINGS -> INTEGRATION -> API ACCESS. 

api access

IMPORTANT: If you change monitoring code on your website, you don’t lose data. Contacts that have been monitored will still be monitored, and all collected data will also be available.


[ Step 2.] Specific external event report –  you can send a request to get a response using different external events with the example below:

Code to copy – click here >>

3