Skip to main content

Web2App - Yandeх Metrica analytics script adding

In this guide we tailor how to insert Yandex Metrica script in your anlyics for regular tracking and cookies policies purposes.

L
Written by Leanid Yuryeu
Updated this week

Contents:

Add Yandex script for Tracking. Basic setup:

Step 1: Find the Yandex counter ID

  1. Log into your Yandex Metrica.

  2. Search for the term “counter”. The counters appear in the search results.

  3. Copy the counter ID. You’ll need it in the following steps.

Step 2: Insert the counter ID into the project:

  1. Go to analytics > Yandex > ADD


2. Paste the counter ID in the following field.


Advanced Yandex setup for Tracking without Cookies policies:

Step 1: Find the Yandex counter ID

  1. Log into your Yandex Metrica.

  2. Search for the term “counter”. The counters appear in the search results.

  3. Copy the counter ID. You’ll need it in the following steps.

Step 2: Insert the script in the Onboarding Online form


Choose advanced settings to manually edit scripts.


Obtain this script and substitute your counter ID in the designated spots.

<!-- Yandex.Metrika counter -->

<script type="text/javascript" >

(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};

m[i].l=1*new Date();

for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}

k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})

(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");

ym(YOUR counter ID, "init", {

clickmap:true,

trackLinks:true,

accurateTrackBounce:true

});

window.yandexCounterId = YOUR counter ID;

</script>

<noscript><div><img src="https://mc.yandex.ru/watch/YOUR counter ID" style="position:absolute; left:-9999px;" alt="" /></div></noscript>

<!-- /Yandex.Metrika counter -->

Open the Onboarding Online Analytics form and insert the script with YOUR metrica ID in the header, Click on Add Web Analytics:

Add Yandex analytics for Tracking with Cookies policies:

Step 1: Find the Yandex counter ID

  1. Log into your Yandex Metrica.

  2. Search for the term “counter”. The counters appear in the search results.

  3. Copy the counter ID. You’ll need it in the following steps.

Step 2: Insert the Yandex counter ID in the Cookies check script

Paste your counter ID in the following field:


In the advanced settings, select "Use Cookies Check." The necessary script, incorporating your ID, will be automatically appended to the "BODY" section.

Click on "Save Web Analtitycs"

Did this answer your question?