Skip to content

User actions tracking

Triggered campaigns launching requires the transmission of user actions/events to Devino.
There are several tracking codes that are required to be installed on your website to launch triggered campaigns.
Supported types of events/actions:

  • DevinoCategoryView - category view
  • DevinoProductView - product view
  • DevinoAddToCartEvent - adding the item to cart
  • DevinoOrderEvent - making an order
  • DevinoEmailSync - email transmission event

Event dispatch code is required to be installed into the template of a particular page and it needs to be placed below the main tracking code.

Main tracking code installation

Main tracking code serves for actions/events transmission to Devino backend for further processing.
On all pages of the website you are to install the code between the \\ tags:

<script src="https://integrationapi.net/web-sdk/devino-web-sdk.js"></script>
<script>
    Devino.init();
</script>

Category view

Use DevinoCategoryView event to track category view statistics:

 <script>
    Devino.sendEvent({
        "eventName":"DevinoCategoryView", 
        "eventData":{
            "categoryId":"string",
            "categoryTitle":"string",
            "categoryUrl":"string"
        }
    })
 </script>
  • categoryId — category identifier
  • categoryTitle — name of this category
  • categoryUrl — direct link, leading to the category view

Item view

The code needs to be placed on the product page.

<script>
    Devino.sendEvent({
        "eventName":"DevinoProductView", 
        "eventData":{
            "productId":"string",
            "productTitle":"string",
            "productUrl":"string",
            "productPrice":"string",
            "productImgUrl":"string"
        }
    })
</script>
  • productId — product ID in your catalog
  • productTitle — product name
  • productUrl — product link. You must specify the full path to the product.
  • productPrice — product price
  • productImgUrl — product image link. You must specify the full path to the image.

Adding the item to cart

Event dispatch code is required to be installed on click by button “add to cart”. Code should be added on every button “add to cart”: in the product card, on the category page and to the product recommendation blocks.

<script>
    Devino.sendEvent({
        "eventName":"DevinoAddToCartEvent", 
        "eventData":{
            "productId":"string",
            "productTitle":"string",
            "productUrl":"string",
            "productPrice":"string",
            "productImgUrl":"string"
        }
    })
</script>
  • productId — added to the cart product id
  • productTitle — product name
  • productUrl — product link. You must specify the full path to the product.
  • productPrice — product price
  • productImgUrl — product image link. You must specify the full path to the image.

Checkout

Event dispatch code is required to be installed on the page “your order is placed”.

<script>
    Devino.sendEvent({
           "eventName":"DevinoOrderEvent",
           "eventData":{
                 "cartTotalPrice":"23450.78"
           }
})
</script>

User data transmission

Event dispatch code is required to be installed on each form: sign in form, sign up form, mail subscription form, checkout form - everywhere a user may leave his email address.

<script>
Devino.updateCustomerData({
    "email": "john.doe@gmail.com",
    "customData": {
        "name": "John Doe",
        "customProperty": "value"
    }
});
</script>
  • email — user email address