1. Adoric help center
  2. Integrations & Third Party

Sending E-commerce event to Adoric

  1. General (paste this code above </body>)

 

Tables can't be imported directly. Please insert an image of your table which can be found here.

<script>
  adoric.trigger('Purchase', {
            value: PURCHASE-VALUE,
            type: 'ecommerce'
       })
</script>


*Note: The value should be numeral. A decimal point can be used as a delimiter between the whole and fractional portion. (Examples: ‘199’; ‘120.99’; ‘12344.99’)

 

 

  1. Send an event after page and adoric code loaded (paste this code above </body>)


Tables can't be imported directly. Please insert an image of your table which can be found here.

<script>
   window.addEventListener('load', function () {
       window.adoric && adoric.trigger('Purchase', {
                    value: 'PURCHASE-VALUE-HERE',
                    type: 'ecommerce'
       })
   });
</script>



  1. Send an event after click on button

 

Tables can't be imported directly. Please insert an image of your table which can be found here.

< button id="purchase">Purchase< /button>

< script>
   document.getElementById("purchase").addEventListener("click", function( event ) {
       // send E-commerce event
  adoric.trigger('Purchase', {
            value: 'PURCHASE-VALUE-HERE',
            type: 'ecommerce'
       })
   }, false);
< /script>




Extra options:

 

Send event by submitting a form on Adoric Web message (paste this code above </body>)

Tables can't be imported directly. Please insert an image of your table which can be found here.

<script>
window.adoric && window.adoric.on("form:after:submit", function (data) {
      adoric.trigger('Purchase', {
            value: 'PURCHASE-VALUE',
            type: 'ecommerce'
       })
});
<script>