1/* T-128 · ÐнÑÑÑÑменÑиÑование Ñелей ЯндекÑ.ÐеÑÑики (ÑÑÑÑÑик 42488474). 2 Ðлики (tel/mailto/конÑакÑÑ), загÑÑзки Ñайлов, копиÑование конÑакÑов, глÑбина ÑкÑолла. 3 Ðдин reachGoal на дейÑÑвие; агÑегаÑÑ Ð² ÐеÑÑике («ÑодеÑÐ¶Ð¸Ñ form_» / «ÑодеÑÐ¶Ð¸Ñ scroll_75_») 4 ÑÑабаÑÑваÑÑ Ð°Ð²ÑомаÑиÑеÑки. ÐÑпÑавка ÑоÑм инÑÑÑÑменÑиÑÑеÑÑÑ Ð² effective-group.js (submitWebflow). 5 ÐденÑиÑикаÑоÑÑ ÑвеÑÐµÐ½Ñ Ñ ÐºÐ¾Ð½Ñигом Ñелей â Ñм. tasks/2026-07-05-4/work/ap-03-metrika-changes.md. */ 6(function ($) { 7 if (!$) return; 8 var COUNTER = 42488474; 9 function goal(id) { 10 if (typeof ym === 'function') ym(COUNTER, 'reachGoal', id); 11 } 12 13 $(function () { 14 // --- Ðлики по ÑÑÑлкам и загÑÑзки Ñайлов (делегиÑование) --- 15 $(document).on('click', 'a[href]', function () { 16 var href = $(this).attr('href') || ''; 17 if (/^tel:/i.test(href)) goal('click_phone'); 18 else if (/^mailto:/i.test(href)) goal('click_email'); 19 else if (/effective_technologies_portfolio\.pdf/i.test(href)) goal('download_portfolio'); 20 else if (/effective_technologies\.pdf/i.test(href)) goal('download_presentation'); 21 else if (/anketa/i.test(href)) goal('download_anketa_etp'); 22 else if (/contacts\.html/i.test(href)) goal('click_contacts'); 23 }); 24 25 // --- ÐопиÑование ÑелеÑона / e-mail (по вÑделениÑ) --- 26 $(document).on('copy', function () { 27 var sel = (window.getSelection && String(window.getSelection())) || ''; 28 if (!sel) return; 29 if (/[\w.+-]+@[\w.-]+\.[a-z]{2,}/i.test(sel)) goal('copy_email'); 30 else if (/(?:\+?\d[\s()\-]*){7,}/.test(sel)) goal('copy_phone'); 31 }); 32 33 // --- ÐлÑбина пÑоÑмоÑÑа на пÑиоÑиÑеÑнÑÑ ÑÑÑаниÑÐ°Ñ --- 34 var SCROLL_SCOPE = { 35 '/solutions/etp.html': 'ETP', 36 '/solutions/srm.html': 'SRM', 37 '/solutions/low-code.html': 'lowcode', 38 '/solutions/portals.html': 'portals' 39 }; 40 var scope = SCROLL_SCOPE[location.pathname]; 41 if (scope) { 42 var fired = {}, $w = $(window); 43 var onScroll = function () { 44 var range = $(document).height() - $w.height(); 45 if (range <= 0) return; 46 var pct = ($w.scrollTop() / range) * 100; 47 if (pct >= 50 && !fired[50]) { fired[50] = 1; goal('scroll_50_' + scope); } 48 if (pct >= 75 && !fired[75]) { fired[75] = 1; goal('scroll_75_' + scope); } 49 if (fired[50] && fired[75]) $w.off('scroll.mgoals'); 50 }; 51 $w.on('scroll.mgoals', onScroll); 52 onScroll(); 53 } 54 }); 55})(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.