Yandex Metrica Analytics Adapter

Features

Module yandexAnalyticsAdapter Prebid.org Member no
TCF-EU Support check with vendor IAB GVL ID check with vendor
USP/CCPA Support check with vendor COPPA Support check with vendor
GPP Support check with vendor Download download page

To use this adapter, include yandexAnalyticsAdapter in your Prebid.js build (for example gulp build --modules=yandexAnalyticsAdapter) and call pbjs.enableAnalytics() as described below. See Prebid.js Analytics Adapters for all analytics adapters.

Description

This adapter integrates Prebid.js with Yandex Metrica. It offers detailed insights into auction performance and user behavior, enabling publishers to make data-driven decisions to optimize their ad revenue.

Disclosure: The adapter utilizes the Metrica Tag build based on github.com/yandex/metrica-tag, approximately 60 kB gzipped.

Setup Instructions

  1. Register Your Website:

    Visit Yandex Metrica and register your website to obtain a counter ID.

  2. Insert Counter Initialization Code:

    Retrieve the counter initialization code from the Yandex Metrica settings page at metrica.yandex.com/r/settings, and embed it into your website’s HTML.

  3. Initialize the Adapter in Prebid.js:

    Configure the Yandex Analytics Adapter in your Prebid.js setup. For optimal performance and ease of management, it is preferred to use a single counter. Add the following JavaScript snippet, replacing 123 with your actual counter ID:

    pbjs.enableAnalytics({
      provider: "yandex",
      options: {
        // Replace 123 with your actual counter ID
        // It's preferred to use a single counter for optimal performance and ease of management
        counters: [123]
      }
    });
    
  4. Special Instructions for Single Page Applications (SPAs):

    If your website is an SPA, make sure to configure your Metrica tag accordingly.

Accessing Analytics Data

You can view the collected analytics data in the Yandex Metrica dashboard. Navigate to metrika.yandex.com/r/stat/prebid_events to analyze your data.