Ростелеком лицей
Ростелеком лицей
Преподаватели Лицея
Занятия в Лицее проводят преподаватели ведущих российских школ и вузов. Доверьте образование детей настоящим фанатам своего дела.
// GA-Push 4 MD&TD-menu
waitLoaded(
'.header-navigation--mobile',
function (menu){
if(!menu || !menu.__vue__)return;
menu.__vue__.pushData = function($ev){
$ev.preventDefault();
menu.__vue__.gaValue.push($ev.target.innerText);
var targetLink;
if($ev.target.localName == 'div') {
targetLink = $ev.target.closest('a').getAttribute('href');
} else if($ev.target.localName == 'a') {
targetLink = $ev.target.getAttribute('href');
}
if (!window.dataLayer) window.dataLayer = [];
window.dataLayer.push({
event: 'main_nav',
eventCategory: menu.__vue__.gaValue.join(' | ')
});
window.location.href = menu.__vue__.fixRegion() + targetLink;
}
});
function clickForGA (item, value, type) {
item.onclick=function(){
dataLayer.push({
event: 'main_nav',
eventCategory: value
})
}
}
// GA-Push 4 DD-menu
(function(){
var
selMenu='.H__menu:not([ref="mainNavEl"])',
prvMenu='#previewNav',
menuNameAttr='data-parent-link';
waitLoaded(selMenu, function(menu){
var nav = menu || document.querySelector(selMenu);
if (!nav) return
nav.children.forEach(function(child){regMenuLink(child)})
waitLoaded(
prvMenu,
function(menu) {
if (menu) { menu.children.forEach(function(child){regSubLinks(child)}) }
}
)
})
// 1lvl-menu
function regMenuLink(child){
if(child.firstChild && child.firstChild.tagName === 'A'){
var link=child.firstChild;
clickForGA(link,[link.textContent.replace(/(^\s*)|(\s*)$/g, '')].join('|')) // trim link text
}
}
function regSubLinks(child){
var parentName=child.getAttribute(menuNameAttr);
// 2lvl-menu
child.querySelectorAll('.Flc__menu-link').forEach(function(link){
clickForGA(link,[parentName,link.textContent].join('|'))
});
}
})();