clarity-js
Version:
An analytics library that uses web page interactions to generate aggregated insights
2 lines (1 loc) • 784 B
JavaScript
!function(){"use strict";function i(i){var n=[window.clarity("time"),52];switch(i){case 0:case 1:case 2:case 3:case 4:case 5:case 6:n.push(i)}!function(i){"undefined"!=typeof window&&window.clarity&&window.clarity("queue",i)}(n)}function n(){i(3)}function s(){i(4)}function e(){i(6)}function c(){i(5)}window.$crisp&&(window.$crisp.push(["on","chat:opened",n]),window.$crisp.push(["on","chat:closed",s]),window.$crisp.push(["on","message:sent",e]),window.$crisp.push(["on","message:received",c])),"undefined"!=typeof window&&window.clarity&&window.clarity("register",(function(){window.$crisp&&(window.$crisp.push(["off","chat:opened",n]),window.$crisp.push(["off","chat:closed",s]),window.$crisp.push(["off","message:sent",e]),window.$crisp.push(["off","message:received",c]))}))}();