AI Website Content Personalization System Development

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1 servicesAll 1566 services
AI Website Content Personalization System Development
Medium
~1-2 weeks
FAQ
AI Development Areas
AI Solution Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822

AI-система персонализации контента сайта

Персонализация сайта — показ разного контента разным посетителям на основе их поведения, источника трафика и истории взаимодействий. Amazon персонализирует главную страницу для каждого пользователя, получая +29% выручки от рекомендательной системы. Для B2B SaaS — персонализация лендинга под вертикаль клиента увеличивает conversion rate на 15-30%.

Сегментация в реальном времени

import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
import json
from anthropic import Anthropic

class RealTimeVisitorSegmentor:
    """Определение сегмента посетителя в первые секунды сессии"""

    def __init__(self):
        self.segment_model = RandomForestClassifier(n_estimators=50, random_state=42)
        self.segments = {
            'new_visitor': {'personalization': 'trust_building'},
            'returning_engaged': {'personalization': 'value_deepening'},
            'high_intent': {'personalization': 'conversion_push'},
            'churned_user': {'personalization': 'win_back'},
            'enterprise_prospect': {'personalization': 'enterprise_messaging'},
        }

    def extract_session_features(self, session_data: dict) -> np.ndarray:
        """Признаки из первых 30 секунд сессии"""
        return np.array([
            int(session_data.get('utm_source', '') == 'google_ads'),
            int(session_data.get('utm_medium', '') == 'email'),
            int(session_data.get('is_returning', False)),
            session_data.get('previous_sessions', 0),
            session_data.get('days_since_last_visit', 999),
            int(session_data.get('device', 'desktop') == 'mobile'),
            int(session_data.get('referrer', '') != ''),
            session_data.get('previous_conversions', 0),
            session_data.get('scroll_depth_prev_session', 0),
            int(bool(session_data.get('company_domain', ''))),  # B2B сигнал
        ])

    def classify_segment(self, session_data: dict) -> dict:
        """Классификация в реальном времени (< 50ms)"""
        features = self.extract_session_features(session_data)

        # Rule-based fallback (быстрее модели для старта)
        if not session_data.get('is_returning'):
            segment = 'new_visitor'
        elif session_data.get('days_since_last_visit', 0) > 90:
            segment = 'churned_user'
        elif session_data.get('previous_conversions', 0) > 0:
            segment = 'returning_engaged'
        elif session_data.get('company_domain'):
            segment = 'enterprise_prospect'
        else:
            segment = 'high_intent'

        return {
            'segment': segment,
            'personalization_strategy': self.segments[segment]['personalization'],
            'confidence': 0.8
        }


class DynamicContentEngine:
    """Движок динамического контента"""

    def __init__(self):
        self.llm = Anthropic()

    def personalize_hero_section(self, segment: str,
                                  industry: str = None,
                                  page_data: dict = None) -> dict:
        """Персонализация главного блока страницы"""
        base_headlines = {
            'new_visitor': "Автоматизируйте процессы с помощью AI",
            'returning_engaged': "Продолжайте там, где остановились",
            'high_intent': "Начните бесплатно сегодня",
            'churned_user': "Вы нас спрашивали — мы обновились",
            'enterprise_prospect': "Enterprise-решения для вашей отрасли",
        }

        cta_buttons = {
            'new_visitor': {"text": "Узнать больше", "variant": "secondary"},
            'returning_engaged': {"text": "Вернуться в продукт", "variant": "primary"},
            'high_intent': {"text": "Попробовать бесплатно", "variant": "primary"},
            'churned_user': {"text": "Посмотреть что нового", "variant": "primary"},
            'enterprise_prospect': {"text": "Запросить демо", "variant": "primary"},
        }

        headline = base_headlines.get(segment, base_headlines['new_visitor'])

        # Отраслевая персонализация через LLM если есть данные
        if industry and segment == 'enterprise_prospect':
            headline = self._generate_industry_headline(industry)

        return {
            'headline': headline,
            'cta': cta_buttons.get(segment, cta_buttons['new_visitor']),
            'social_proof': self._get_social_proof(segment, industry),
            'trust_badges': self._get_trust_badges(segment)
        }

    def _generate_industry_headline(self, industry: str) -> str:
        response = self.llm.messages.create(
            model="claude-3-5-sonnet-20241022",
            max_tokens=50,
            messages=[{
                "role": "user",
                "content": f"Write a compelling 6-8 word headline for {industry} companies considering AI automation. Russian language. No fluff."
            }]
        )
        return response.content[0].text.strip()

    def _get_social_proof(self, segment: str, industry: str) -> dict:
        # Показываем кейсы, релевантные сегменту
        if industry:
            return {'type': 'case_study', 'industry_match': industry}
        elif segment == 'enterprise_prospect':
            return {'type': 'logos', 'tier': 'enterprise'}
        elif segment == 'new_visitor':
            return {'type': 'stats', 'metric': 'user_count'}
        return {'type': 'testimonials', 'count': 3}

    def _get_trust_badges(self, segment: str) -> list[str]:
        base = ['ssl_secure']
        if segment == 'enterprise_prospect':
            base += ['soc2', 'gdpr', 'iso27001']
        elif segment in ['high_intent', 'new_visitor']:
            base += ['free_trial', 'no_credit_card']
        return base

    def personalize_content_feed(self, user_history: list[dict],
                                   content_catalog: list[dict],
                                   n_items: int = 6) -> list[dict]:
        """Персонализация ленты статей/кейсов"""
        if not user_history:
            # Cold-start: популярный контент
            return sorted(content_catalog,
                          key=lambda x: x.get('views_7d', 0),
                          reverse=True)[:n_items]

        # Извлекаем интересы из истории
        viewed_tags = set()
        for item in user_history:
            viewed_tags.update(item.get('tags', []))

        # Скоринг контента
        scored = []
        viewed_ids = {item['id'] for item in user_history}

        for content in content_catalog:
            if content['id'] in viewed_ids:
                continue

            content_tags = set(content.get('tags', []))
            tag_overlap = len(viewed_tags & content_tags) / max(len(content_tags), 1)
            freshness = 1.0 / (1 + content.get('days_old', 30) / 30)
            quality = content.get('engagement_score', 0.5)

            score = tag_overlap * 0.5 + freshness * 0.2 + quality * 0.3
            scored.append({**content, 'relevance_score': score})

        return sorted(scored, key=lambda x: -x['relevance_score'])[:n_items]


class PersonalizationABTester:
    """A/B тестирование персонализации"""

    def calculate_experiment_results(self,
                                      control: pd.DataFrame,
                                      treatment: pd.DataFrame) -> dict:
        """Статистическая значимость результатов A/B теста"""
        from scipy import stats

        control_cvr = control['converted'].mean()
        treatment_cvr = treatment['converted'].mean()

        # Z-test для пропорций
        n_c, n_t = len(control), len(treatment)
        p_pool = (control['converted'].sum() + treatment['converted'].sum()) / (n_c + n_t)
        se = np.sqrt(p_pool * (1 - p_pool) * (1/n_c + 1/n_t))

        if se > 0:
            z_stat = (treatment_cvr - control_cvr) / se
            p_value = 2 * (1 - stats.norm.cdf(abs(z_stat)))
        else:
            p_value = 1.0

        return {
            'control_cvr': round(control_cvr * 100, 2),
            'treatment_cvr': round(treatment_cvr * 100, 2),
            'lift_pct': round((treatment_cvr - control_cvr) / control_cvr * 100, 1),
            'p_value': round(p_value, 4),
            'significant': p_value < 0.05,
            'sample_sizes': {'control': n_c, 'treatment': n_t}
        }

Персонализация контента сайта даёт 10-30% прирост conversion rate для SaaS и 5-15% для e-commerce при корректной реализации. Ключевые условия: достаточный трафик для статистической значимости (минимум 500 конверсий на вариант), качественная сегментация, A/B тестирование каждого изменения.