Note: This article only applies to customers using web chat. If you are a Genesys Cloud CX customer using web messaging, see Messaging-related tags.

Record a custom web event when a visitor rejects a chat offer

This tag records a custom web event when a visitor rejects a chat offer.

Tag

ac('dom', 'ready', function () {  Array.prototype.forEach.call(document.querySelectorAll('cx-toaster button.cx-btn-default, .cx-toaster button.cx-button-close'), function (closeButton) {    closeButton.on('click', function () {      ac('record', 'chatoffer_rejected');    });  });});