(function(bannerClassName) { const sendEvent = (token, action) => { const value = 'Branding ' + token + ' – ' + action; if (window.dataLayer !== undefined) { window.dataLayer.push({ event: 'data_event', data_description: value, }); } else { console.log('GA send: ' + value); } }; const oneBeforePageChange = (callback) => { if (typeof Air === 'object') { const ajaxify = Air.import('module.ajaxify'); ajaxify.one('Before page changed', () => { try { if (callback) { callback(); } } catch (error) { console.log(error); } }); } }; const onLinkClick = (e) => { const link = e.target; const href = link.getAttribute('href'); sendEvent(href, 'Click'); link.removeEventListener('click', onLinkClick); }; const branding = document.querySelector(bannerClassName); if (!branding) { return; } const links = branding.querySelectorAll('a'); for (let i = 0; i < links.length; i += 1) { const isVisible = getComputedStyle(links[i]).display !== 'none'; const href = links[i].getAttribute('href'); if (isVisible) { sendEvent(href, 'Show'); } links[i].addEventListener('click', onLinkClick); } oneBeforePageChange(() => { for (let i = 0; i < links.length; i += 1) { links[i].removeEventListener('click', onLinkClick); } }); })('.entry-native-branding');

Статья удалена

Этот материал был удалён по просьбе автора.

(function(bannerClassName) { const sendEvent = (token, action) => { const value = 'Branding ' + token + ' – ' + action; if (window.dataLayer !== undefined) { window.dataLayer.push({ event: 'data_event', data_description: value, }); } else { console.log('GA send: ' + value); } }; const oneBeforePageChange = (callback) => { if (typeof Air === 'object') { const ajaxify = Air.import('module.ajaxify'); ajaxify.one('Before page changed', () => { try { if (callback) { callback(); } } catch (error) { console.log(error); } }); } }; const onLinkClick = (e) => { const link = e.target; const href = link.getAttribute('href'); sendEvent(href, 'Click'); link.removeEventListener('click', onLinkClick); }; const branding = document.querySelector(bannerClassName); if (!branding) { return; } const links = branding.querySelectorAll('a'); for (let i = 0; i < links.length; i += 1) { const isVisible = getComputedStyle(links[i]).display !== 'none'; const href = links[i].getAttribute('href'); if (isVisible) { sendEvent(href, 'Show'); } links[i].addEventListener('click', onLinkClick); } oneBeforePageChange(() => { for (let i = 0; i < links.length; i += 1) { links[i].removeEventListener('click', onLinkClick); } }); })('.entry-article-footer');
0
6 комментариев
Написать комментарий...
бонч

Берешь с собой пустой термос, пакетик чая, проходишь контроль, идешь в кафе и просишь налить кипяток, изи мани....
Инвестируешь их в Тинькофф, а затем пишешь на vc.ru статью как стоп-лосс не сработал и банк украл 200 рублей.

Ответить
Развернуть ветку
Ruslan Borisovich Alekseev

Статья норм, но я так и не понял, что такое «крайний этаж»))

Ответить
Развернуть ветку
Denis Bystruev

Суеверия часто летающих.

Ответить
Развернуть ветку
Ruslan Borisovich Alekseev

Суеверия в 21 веке, ну оооок))

Ответить
Развернуть ветку
Аккаунт удален
Автор

Комментарий недоступен

Ответить
Развернуть ветку
Nathan Zachary
Ответить
Развернуть ветку
3 комментария
Раскрывать всегда
null