اسم الكاتب: عمر مشهور

خبير تحسين محركات البحث (SEO) أعمل على مراجعة المحتوى وتدقيقه ليتوافق مع معايير محركات البحث، وضمان تحسين ظهوره في النتائج. أمتلك خبرة عملية تزيد عن 4 سنوات في مجال (SEO) وتحليل المواقع.

يبدو أننا لا نستطيع العثور على ما تبحث عنه. ربما قد يساعدك البحث.

) */ (function () { 'use strict';// ─── CONFIG ─────────────────────────────────────────────────────────────── const APP_DOMAIN = 'app.goielts.ai'; const REL_VALUE = 'nofollow noopener noreferrer';const PAID_PARAMS = [ 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term', 'gclid', 'fbclid', 'ttclid', 'sclid', 'msclkid' ];const ORGANIC_UTM = { utm_source: 'goielts_mkt', utm_medium: 'organic', utm_campaign: 'cta_signup', };// ─── HELPERS ────────────────────────────────────────────────────────────── const pageParams = new URLSearchParams(window.location.search); const hasPaidParams = PAID_PARAMS.some(p => pageParams.get(p));function getPageSlug() { const parts = window.location.pathname.split('/').filter(Boolean); return parts.length > 0 ? decodeURIComponent(parts[parts.length - 1]) : 'homepage'; }function getPosition(link) { if (link.closest('#masthead') || link.closest('.ast-mobile-header-wrap')) return 'header'; if (link.closest('#secondary') || link.closest('.sidebar-main')) return 'sidebar'; if (link.closest('.try-proInsightsNow-single-post-new')) return 'content_banner'; if (link.closest('.try-proInsightsNow-single-post.mobile')) return 'mobile_sticky'; if (link.closest('.entry-content') || link.closest('article')) return 'content_inline'; if (link.closest('#colophon') || link.closest('.site-footer')) return 'footer'; return 'other'; }// ─── MAIN PROCESSOR ─────────────────────────────────────────────────────── const positionCounters = {};function processLink(link) { try { const url = new URL(link.href); if (!url.hostname.includes(APP_DOMAIN)) return;// 1. Always enforce rel — SEO + security link.setAttribute('rel', REL_VALUE);// 2. Paid params take full priority if (hasPaidParams) { PAID_PARAMS.forEach(param => { const value = pageParams.get(param); if (value && !url.searchParams.has(param)) { url.searchParams.set(param, value); } });// 3. Organic UTM — only if no campaign already set } else if (!url.searchParams.has('utm_campaign')) { const position = getPosition(link); positionCounters[position] = (positionCounters[position] || 0) + 1;Object.entries(ORGANIC_UTM).forEach(([key, val]) => { url.searchParams.set(key, val); }); url.searchParams.set('utm_term', getPageSlug()); url.searchParams.set('utm_content', `${position}_${positionCounters[position]}`); }link.href = url.toString();} catch (e) { console.error('GoIELTS Link Processor: Failed on', link.href, e); } }function processAllLinks() { document.querySelectorAll(`a[href*="${APP_DOMAIN}"]`).forEach(processLink); }// ─── INITIAL RUN ────────────────────────────────────────────────────────── // Footer placement = DOM already parsed, no DOMContentLoaded needed processAllLinks();// ─── MUTATION OBSERVER — catches dynamically injected banners/CTAs ───────── new MutationObserver(mutations => { mutations.forEach(({ addedNodes }) => { addedNodes.forEach(node => { if (node.nodeType !== 1) return; if (node.matches(`a[href*="${APP_DOMAIN}"]`)) { processLink(node); } node.querySelectorAll(`a[href*="${APP_DOMAIN}"]`).forEach(processLink); }); }); }).observe(document.body, { childList: true, subtree: true });})();
Scroll to Top