/** * PRISRA PATCH 1.1 — CUSTOM JS * Tilda: Site Settings → More → Custom JS (before ) * ------------------------------------------------------- * Targets: A1 lang, A2 alt attributes, A4 form labels, * F3 lazy/preload, F4 CLS reveal fix, U3 scroll fix */ (function () { 'use strict'; /* ================================================ A1: lang attribute — set from URL path Runs immediately (in via head.html too, this is the body-level fallback) ================================================ */ function setLang() { var p = window.location.pathname; var lang = 'ru'; if (p.startsWith('/ua')) lang = 'uk'; else if (p.startsWith('/en') || p.startsWith('/english')) lang = 'en'; if (document.documentElement.lang !== lang) { document.documentElement.lang = lang; } } setLang(); /* ================================================ A2: Alt attributes — audit + auto-fix missing Decorative images get alt="", semantic get a generated fallback (then review manually) ================================================ */ function fixAltAttributes() { var images = document.querySelectorAll('img:not([alt])'); images.forEach(function (img) { // Social icons — empty alt (decorative) if (img.closest('a[href*="facebook"]') || img.closest('a[href*="instagram"]') || img.closest('a[href*="linkedin"]') || img.closest('a[href*="youtube"]') || img.closest('a[href*="telegram"]') || img.closest('a[href*="whatsapp"]')) { img.setAttribute('alt', ''); return; } // Logo if (img.closest('.t-logo') || img.className.includes('logo')) { img.setAttribute('alt', 'PRISRA'); return; } // Service cards — try to read from sibling title var card = img.closest('.t-card, .t-tile__item, [class*="card"]'); if (card) { var title = card.querySelector('.t-card__title, .t-tile__title, h3, h4'); if (title && title.textContent.trim()) { img.setAttribute('alt', title.textContent.trim() + ' — PRISRA'); return; } } // Team photos — try from sibling var teamItem = img.closest('[class*="team"], [class*="person"]'); if (teamItem) { var name = teamItem.querySelector('[class*="name"], h3, h4, strong'); if (name) { img.setAttribute('alt', name.textContent.trim() + ', PRISRA team'); return; } } // Fallback — set empty (decorative) to avoid violation img.setAttribute('alt', ''); }); // aria-label on social icon links without text var socialLinks = document.querySelectorAll( 'a[href*="facebook.com"], a[href*="instagram.com"], a[href*="linkedin.com"], a[href*="youtube.com"], a[href*="t.me"], a[href*="telegram"]' ); var labelMap = { 'facebook.com': 'Facebook', 'instagram.com': 'Instagram', 'linkedin.com': 'LinkedIn', 'youtube.com': 'YouTube', 't.me': 'Telegram', 'telegram': 'Telegram', 'whatsapp': 'WhatsApp', 'wa.me': 'WhatsApp' }; socialLinks.forEach(function (a) { if (!a.getAttribute('aria-label') && !a.textContent.trim()) { for (var key in labelMap) { if (a.href.includes(key)) { a.setAttribute('aria-label', labelMap[key]); break; } } } }); } /* ================================================ A4: Form labels — inject sr-only labels for any input/textarea without accessible name ================================================ */ function fixFormLabels() { var labelMap = { 'name': 'Имя', 'имя': 'Имя', 'phone': 'Телефон', 'телефон': 'Телефон', 'tel': 'Телефон', 'email': 'Email', 'site': 'Сайт', 'url': 'Сайт', 'task': 'Что нужно', 'comment': 'Комментарий', 'комментарий': 'Комментарий' }; var inputs = document.querySelectorAll( 'input:not([type="hidden"]):not([type="submit"]):not([type="button"]), textarea, select' ); inputs.forEach(function (input) { // Already has accessible name if (input.getAttribute('aria-label') || input.getAttribute('aria-labelledby') || input.id && document.querySelector('label[for="' + input.id + '"]')) { return; } var placeholder = (input.getAttribute('placeholder') || '').toLowerCase(); var name = (input.getAttribute('name') || '').toLowerCase(); var labelText = null; for (var key in labelMap) { if (placeholder.includes(key) || name.includes(key)) { labelText = labelMap[key]; break; } } if (!labelText) { labelText = input.getAttribute('placeholder') || 'Поле формы'; } // Add aria-label (non-intrusive) input.setAttribute('aria-label', labelText); }); } /* ================================================ F3: Lazy loading — add to below-fold images (Hero image keeps eager/fetchpriority=high) ================================================ */ function fixLazyLoading() { var heroSection = document.querySelector('.t-cover, [data-record-type="cover"]'); var heroImgs = heroSection ? heroSection.querySelectorAll('img') : []; var heroImgSet = new Set(heroImgs); var allImgs = document.querySelectorAll('img:not([loading])'); allImgs.forEach(function (img) { if (heroImgSet.has(img)) { // Hero image: eager + fetchpriority img.setAttribute('loading', 'eager'); img.setAttribute('fetchpriority', 'high'); } else { img.setAttribute('loading', 'lazy'); // Add explicit dimensions if missing to prevent CLS if (!img.getAttribute('width') && img.naturalWidth) { img.setAttribute('width', img.naturalWidth); img.setAttribute('height', img.naturalHeight); } } }); // Video poster var videos = document.querySelectorAll('video:not([poster])'); videos.forEach(function (v) { // Can't set poster without knowing the image URL — log for manual fix console.warn('[PRISRA A11y] Video missing poster attribute:', v.src || v.currentSrc); }); } /* ================================================ F4 + U3: Scroll reveal — fix blank sections Override Tilda's slow reveal threshold ================================================ */ function fixRevealAnimations() { if (!window.IntersectionObserver) return; var obs = new IntersectionObserver(function (entries) { entries.forEach(function (e) { if (e.isIntersecting) { var el = e.target; el.style.opacity = '1'; el.style.transform = 'none'; el.style.visibility = 'visible'; obs.unobserve(el); } }); }, { threshold: 0, rootMargin: '0px 0px 800px 0px' }); // Make hero/above-fold visible immediately var aboveFold = document.querySelectorAll( '.t-cover *, .t-cover, [data-record-type="cover"] *' ); aboveFold.forEach(function (el) { el.style.opacity = '1'; el.style.transform = 'none'; el.style.animation = 'none'; }); // Observe below-fold animated elements var animated = document.querySelectorAll( '[data-animate-once="1"], [data-animate], .t-animate, .t-entry-animate' ); animated.forEach(function (el) { // Skip hero if (el.closest('.t-cover')) return; obs.observe(el); }); } /* ================================================ SEO2: Tap targets — fix too-small touchables ================================================ */ function fixTapTargets() { var minSize = 48; // Social links in header var socialLinks = document.querySelectorAll( '.t-header .t-sociallinks a, .t-header a[href*="social"]' ); socialLinks.forEach(function (a) { var rect = a.getBoundingClientRect(); if (rect.width < minSize || rect.height < minSize) { a.style.minWidth = minSize + 'px'; a.style.minHeight = minSize + 'px'; a.style.display = 'inline-flex'; a.style.alignItems = 'center'; a.style.justifyContent = 'center'; } }); // Dropdown arrows var dropdownBtns = document.querySelectorAll( '.t-menu__list-item > button, [class*="dropdown-toggle"]' ); dropdownBtns.forEach(function (btn) { var rect = btn.getBoundingClientRect(); if (rect.height < minSize) { btn.style.minHeight = minSize + 'px'; btn.style.padding = '12px'; } }); } /* ================================================ RUN: DOMContentLoaded ================================================ */ if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { fixAltAttributes(); fixFormLabels(); fixLazyLoading(); fixRevealAnimations(); fixTapTargets(); } // Re-run after Tilda's own DOMReady (Tilda fires custom events) document.addEventListener('tildaready', function () { fixAltAttributes(); fixFormLabels(); fixLazyLoading(); fixRevealAnimations(); }); })();
 

Setting up Google Ads advertising

Only certified specialists
Full immersion in business
100% quality guarantee
The first result in 5 days

Record on
express consultation
By registering, you agree to our Privacy Policy.

Advertising services

Marketing agency Prisra is an official partner of Google, our specialists have certificates in various directions of contextual advertising.
Banner advertising

✓ Creating a Google Ads advertising account, making basic settings
✓ Selection of sites and auditoriums where banners will be displayed
✓ Creation of adaptive media banner ads
✓ Budget management, redistribution to more effective campaigns, ad groups
✓ Testing different banners, determining the most effective ones
✓ Monthly report on clicks, budget expenses, etc.
✓ Connecting and configuring Google
✓ Analytics on the site and its connection with the advertising account
✓ Setup and tracking of conversions, optimization of advertising according to goals
✓ Setting up a remarketing campaign for those who visited the site
Youtube Ads settings

✓ Selection of the target audience
✓ Setting up advertising campaigns
✓ Adjustment of budgets and expenses
✓ Setting metric systems, setting pixel
✓ Control and management of rates and displays
✓ Performance tracking
✓ Collection of keywords
Recent cases

Contextual Google advertising from the Prisra marketing agency

By using professional support and help during the setup and further optimization of advertisements, you can achieve your goal. We follow all mandatory stages that will help bring your business to a completely new level.

Contextual Google advertising in Israel is necessary for every businessman, regardless of how popular his brand is among a wide range of consumers.

Contextual Google advertising is a valid solution for most entrepreneurs who will be able to diversify their customer base with new buyers. Our agency in Israel will help organize an effective advertising campaign capable of increasing sales and making your services truly popular among potential consumers.
Контекстная реклама Google от маркетингового агентства «Prisra»
Our services include:

· Google Ads settings. We conduct a detailed analysis of your main competitors and select a list of keywords for which your ad can be found in the search bar. In addition, our specialists will carry out careful control and further management of rates, impressions of ad data.

· Facebook Ads settings. In this case, it is advisable to conduct a careful selection of the target audience, to divide all consumers of the group according to interests. We will help you choose relevant and working placements. In addition, our team develops ads in an original style (corporate colors of your company, logo are taken into account).

· YouTube Ads settings. In the process, a mandatory selection of the target audience takes place. Then our experts create advertising campaigns, adjust budgets, and collect keywords. In order to check the "ability" of advertising, we monitor its effectiveness.