Javascript / Events References

Add this JS function for listening to events fired by Stamped.io

function addEventListenerStamped(el, eventName, handler) { 
   if (el.addEventListener) { el.addEventListener(eventName, handler); }
   else { el.attachEvent('on' + eventName, function () { handler.call(el); }); } 
}

// Listening for event
addEventListenerStamped(document, '##replaceWithEventName##', function(e) {
  console.log(e);
});

// Example
// Listening for reviews widget loaded event
addEventListenerStamped(document, 'stamped:reviews:loaded', function(e) {
  console.log(e);
});

Events

Event Name Fired When
stamped:reviews:loaded Product Reviews widget loaded

Still need help? Contact Us Contact Us