Smart Banner Development with Personalization for Each User

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
Smart Banner Development with Personalization for Each User
Medium
~3-5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1360
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1251
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    957
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    948

You spend budget on ad banners, but their CTR doesn't reach 1%. The problem is that everyone sees the same offer. We solve this with smart banners: dynamic blocks that show each user exactly the products they viewed or that the algorithm considers relevant. The result is a 2-3x increase in CTR and a 15-30% boost in conversion. The customer acquisition cost (CAC) also decreases by 20-30% thanks to more relevant targeting. Contact us for a free engineering consultation to get a preliminary estimate.

How View Tracking Works

Personalization starts with data collection. We use a JavaScript class ViewHistoryTracker that saves view history in localStorage and syncs with the server for authorized users. This is a minimally invasive solution — no cookie banner or GDPR consent required for anonymous sessions.

class ViewHistoryTracker {
  private readonly KEY = 'view_history';
  private readonly MAX_ITEMS = 50;

  track(item: ViewedItem): void {
    const history = this.get();
    const filtered = history.filter(i => i.id !== item.id);
    const updated = [
      { ...item, viewed_at: Date.now() },
      ...filtered,
    ].slice(0, this.MAX_ITEMS);
    localStorage.setItem(this.KEY, JSON.stringify(updated));
    this.syncToServer(item);
  }

  get(): ViewedItem[] {
    try {
      return JSON.parse(localStorage.getItem(this.KEY) ?? '[]');
    } catch {
      return [];
    }
  }

  getRecent(count = 10): ViewedItem[] {
    return this.get().slice(0, count);
  }

  private async syncToServer(item: ViewedItem): Promise<void> {
    if (!getAuthToken()) return;
    await fetch('/api/views', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(item),
    });
  }
}

What Collaborative Filtering Provides

Simply showing the last viewed products gives low CTR — the user has already seen them. We use ranking with category weights and popularity, as well as collaborative filtering to build a user-item matrix. Recent views get higher weight, duplicates are excluded. This approach increases CTR by 2-3 times in our measurements.

function rankItems(history: ViewedItem[], candidates: CatalogItem[]): CatalogItem[] {
  const categoryWeights: Record<string, number> = {};
  const viewedIds = new Set(history.map(i => i.id));

  history.forEach((item, index) => {
    const recencyWeight = 1 / (index + 1);
    categoryWeights[item.category] = (categoryWeights[item.category] ?? 0) + recencyWeight;
  });

  return candidates
    .filter(c => !viewedIds.has(c.id))
    .map(candidate => ({
      ...candidate,
      score: (categoryWeights[candidate.category] ?? 0) * (candidate.popularity ?? 1),
    }))
    .sort((a, b) => b.score - a.score)
    .slice(0, 6);
}

For large projects (from 10k products) we move the engine to the server on PHP/Laravel with a PostgreSQL matrix. We cache recommendations in Redis — API response time stays under 50 ms.

Case study: electronics e-commerce store with a catalog of 5000 products. After implementing the smart banner, CTR grew from 0.8% to 2.4%, conversion from banner to purchase was 12%. Average order value increased by 8% due to cross-sells.

Comparison of Implementation Approaches

Parameter Client-side tracking + server engine External platform (Retail Rocket)
Implementation time 3–5 days 1–2 days
Recommendation accuracy High (own algorithms) High (ML models)
Maintenance cost Low (own server) Monthly subscription
Data control Full Partial (data transfer)
Scalability Up to 100k products From 10k to 1M+ products

Comparison of Recommendation Algorithms

Criterion Client-side ranking Server-side collaborative filtering
Data History in localStorage Purchase and view matrix
Accuracy Medium High
Server load None Moderate (with cache)
Cold start Not an issue Requires data
Common Mistakes During Implementation
  • Showing products the user just saw. Always exclude viewed items.
  • Ignoring product popularity — category weight without popularity gives weak recommendations.
  • Not caching server requests. Without Redis, each view generates an SQL query — with 10k users the database will crash.
  • Not tracking banner clicks. Without analytics, you won't know real CTR.
  • Forgetting mobile adaptation — the banner must display correctly on all devices.

How We Implement Smart Banner Rendering

A React (or Vue) component is embedded in the desired location: sidebar, inline, or sticky-bottom. It requests recommendations via API and displays products with image, name, and price. On click, an event is sent to Google Analytics.

interface SmartBannerProps {
  placement: 'sidebar' | 'inline' | 'sticky-bottom';
  title?: string;
}

function SmartBanner({ placement, title = 'You viewed' }: SmartBannerProps) {
  const [items, setItems] = useState<CatalogItem[]>([]);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    const history = tracker.getRecent();
    if (history.length === 0) {
      setLoading(false);
      return;
    }

    fetch('/api/recommendations', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        viewed_ids: history.map(i => i.id),
        categories: [...new Set(history.map(i => i.category))],
        limit: placement === 'sidebar' ? 4 : 6,
      }),
    })
      .then(r => r.json())
      .then(data => setItems(data.items))
      .finally(() => setLoading(false));
  }, [placement]);

  if (loading) return <BannerSkeleton count={4} />;
  if (items.length === 0) return null;

  return (
    <div className={`smart-banner smart-banner--${placement}`}>
      <h3 className="smart-banner__title">{title}</h3>
      <div className="smart-banner__grid">
        {items.map(item => (
          <a
            key={item.id}
            href={item.url}
            className="smart-banner__item"
            onClick={() => trackBannerClick(item, placement)}
          >
            <img src={item.image} alt={item.title} loading="lazy" />
            <span className="smart-banner__name">{item.title}</span>
            <span className="smart-banner__price">{formatPrice(item.price)}</span>
          </a>
        ))}
      </div>
    </div>
  );
}

function trackBannerClick(item: CatalogItem, placement: string): void {
  gtag('event', 'smart_banner_click', {
    item_id: item.id,
    item_name: item.title,
    placement,
    item_category: item.category,
  });
}

Server Endpoint for Recommendations

We use a Laravel controller that excludes viewed products and ranks by category and popularity. For speed we add Redis cache.

class RecommendationsController extends Controller
{
    public function index(Request $request): JsonResponse
    {
        $viewedIds = $request->input('viewed_ids', []);
        $categories = $request->input('categories', []);
        $limit = min($request->input('limit', 6), 12);

        $items = Product::query()
            ->whereNotIn('id', $viewedIds)
            ->where('is_active', true)
            ->where(function ($q) use ($categories) {
                $q->whereIn('category_slug', $categories)
                  ->orWhere('is_bestseller', true);
            })
            ->orderByRaw('
                CASE WHEN category_slug = ANY(?) THEN 1 ELSE 2 END,
                popularity DESC
            ', ['{' . implode(',', $categories) . '}'])
            ->limit($limit)
            ->get(['id', 'title', 'price', 'image', 'url', 'category_slug']);

        return response()->json(['items' => $items]);
    }
}

When to Connect External Platforms

For stores with a catalog from 10k products or when a ready ML model is needed, we integrate Retail Rocket or Mindbox. Basic Retail Rocket integration takes 1-2 days:

rrApi.view(123456);
rrApi.addToBasket(123456);
rrApiOnReady(function() {
  rrApi.recommend('block_id_from_rr_panel', {
    callback: function(items) { renderRecommendations(items); }
  });
});

What's Included

  • Designing tracking and data storage schema
  • Developing client-side banner component with support for different placements
  • Server endpoint for recommendations with caching
  • Analytics integration (GA/Yandex.Metrica)
  • API documentation and embedding instructions
  • Handover of repository and hosting access
  • Training your developer (1 hour online)
  • 3-month warranty on correct algorithm operation

Timeline and Pricing

Implementation timeline: from 3 to 8 days depending on complexity. Pricing is calculated individually — we will evaluate the project after a brief. Over our work, we have implemented smart banners for dozens of e-commerce stores, with an average CTR increase of 180%. Our team has 5+ years of experience in e-commerce personalization.

If you want to increase conversion from ad blocks without extra cost, contact us — we will discuss your task and offer the best solution. Get a free engineering consultation for a preliminary estimate.

Setup Web Analytics: GA4, GTM, Yandex.Metrica, and Amplitude

We often see: conversion rate 1.2%, traffic grows, but conversion stays flat. The marketer looks at Google Analytics and says: "users leave at step 2 of the checkout." The developer opens the same step — no errors, Sentry is silent. So it's not a JS bug, but a UX issue or skewed data from analytics. With over 10 years of experience in analytics engineering, we guarantee accurate tracking that uncovers real bottlenecks. Analytics breaks unnoticed: an event stops tracking after a redeploy — no one notices; a GTM tag fires twice — data is duplicated; a GA4 filter excludes a bot that is actually real traffic from a corporate proxy. An audit of your current tags will find the cause within a week.

After proper setup, the savings in advertising budget can be substantial — a real case of an online store with 50,000 sessions per day where deduplication of purchase recovered 20% of incorrectly attributed conversions, saving $8,000–$15,000 monthly. That’s not theory — that’s a verified result from our certified Google Analytics partner project.

Why do GA4 events duplicate and how to fix it?

Universal Analytics is gone, replaced by GA4's event-based model. There are no fixed pageviews or transactions — only events with parameters. This is more flexible but requires proper event design. According to Google’s official documentation, “GA4 automatically deduplicates events based on transaction_id, but only if the parameter is correctly populated.” Many implementations miss this.

Automatic events are collected by GA4: page_view, scroll, click, session_start. Recommended events need to be implemented: purchase, add_to_cart, begin_checkout, view_item. Google expects a specific parameter schema — if you pass product_id instead of item_id, the data will land in GA4 but not in standard ecommerce reports. Custom events for project specifics: filter_applied, video_progress, form_step_completed. Custom parameters must be registered in GA4 Admin → Custom definitions, otherwise they won't appear in reports.

A common mistake is the purchase event being duplicated. Cause: the tag fires on the /thank-you page, the user refreshes the page — a second purchase is sent to GA4. Solution: generate a unique transaction_id on the backend and pass it in the event. In our experience, 80% of e-commerce stores have this issue. GA4 deduplicates based on it (in theory — verify with DebugView). Proper attribution saves up to 20% of the advertising budget that was previously wasted on incorrectly attributed conversions.

How to set up the data layer to avoid data loss?

GTM is a tool for managing tags without code deployment. But "no code" doesn't mean "no architecture." The data layer is the foundation. We pass data from the application to GTM via dataLayer.push(). Structure: event + contextual data. For e-commerce: before opening a product page — push with product data. GTM tag reads from the data layer, not from the DOM.

window.dataLayer = window.dataLayer || [];
dataLayer.push({
  event: 'view_item',
  ecommerce: {
    items: [{
      item_id: 'SKU-12345',
      item_name: 'Product name',
      price: 1990.00,
      currency: 'USD'
    }]
  }
});

Bad practice: GTM tag parses the DOM — looks for the price in span.price, the name in h1. This breaks with any layout change. Good practice: always use the data layer. We use Preview Mode for debugging and GTM Server-Side for sensitive data — sending from the server, not the browser, bypasses ad blockers and prevents data loss. A properly implemented data layer reduces tracking errors by 95%.

How does Yandex.Metrica complement web analytics?

For a Russian audience, Metrica is a must — especially Webvisor. Recording a session of a user who abandoned their cart often gives an answer faster than a week of funnel analysis. Goals in Metrica: event-based (via ym(COUNTER_ID, 'reachGoal', 'GOAL_NAME')) or automatic (button click, page visit). Integration with CRM via Metrica Plus — passing offline conversions. Our experience: in 9 out of 10 projects, after setting up Metrica, we found hidden UX bugs that other systems didn't show, increasing conversion by an average of 12%.

What does product analytics give in Amplitude?

Amplitude is a product tool, unlike marketing-oriented GA4 and Metrica. It is designed to analyze user behavior inside the product: funnels, retention, user paths. Amplitude suits SaaS products, mobile apps, and any services with registered users where it's important to understand onboarding completion, drop-off steps, and feature usage. Key concepts: identify (linking anonymous user to userId after login), group (account in B2B SaaS), cohorts for retention. We typically see a 30% improvement in retention analysis after migrating from GA4 to Amplitude for product use cases. Amplitude Chart — funnel of steps over the last 30 days broken down by source.

Monitoring Data Quality

Analytics without monitoring is a black box. We set up:

  • GA4 Realtime — check after every deploy that key events are coming in
  • Alerting in GA4 — anomaly in the number of purchase events (sharp drop = something broke)
  • GTM Preview in staging before production
  • Manual funnel tests once a week — simply go through the buyer journey and verify everything is tracked
What we check after each deploy
  • All recommended events present in DebugView
  • No duplicates (count purchase per 100 sessions)
  • Data layer structure unchanged after frontend update

What the work includes

Component Description
Audit of existing tags Check current GTM tags, data layer, duplicates, and errors
Event schema design Documentation: event list, parameters, triggers
GA4 + GTM setup Create configuration, tags, custom definitions
Yandex.Metrica Install counter, create goals, set up Webvisor
Amplitude (optional) Set up client and server SDK, cohorts
QA and monitoring Testing in Preview Mode, alerting
Training and handover Access, instructions for adding new events, console

Process and timeline

  1. Audit of existing tags and data (2 days)
  2. Event schema design (2 days)
  3. Data layer development and tag setup (3–5 days)
  4. QA in Preview Mode and staging (2 days)
  5. Deploy and dashboard setup (1 day)
Scenario Timeline
Basic GA4 + GTM setup 1 week
Full e-commerce tracking + Metrica 2–3 weeks
Server-side GTM + Amplitude 3–5 weeks

Cost is calculated individually. Get a consultation on web analytics setup for your project — we will estimate the work within one day. Contact us to get started with a free audit of your current tracking.