Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- init()
- function init() {
- setTimeout(addMouseout, 5000);
- }
- function addMouseout() {
- document.addEventListener('mouseout', mouseout);
- }
- function mouseout(e) {
- if (Math.round(e.x) >= 0 && Math.round(e.y) <= 0) {
- if (location.pathname.indexOf('/shop/catalog')>-1 || location.pathname.indexOf('/product/')>-1) {
- carrotquest.track('Неавторизованный пользователь покидает каталог магазина');
- }
- else if (location.pathname.indexOf('/course/catalog')>-1) {
- carrotquest.track('Неавторизованный пользователь покидает каталог курсов');
- };
- deleteEvent();
- setTimeout(addMouseout, 10000);
- }
- }
- function deleteEvent() {
- document.removeEventListener('mouseout', mouseout);
- }
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement