B
B
BuTaMuH4uK2019-04-26 20:16:50
Yandex.Metrica
BuTaMuH4uK, 2019-04-26 20:16:50

Data does not go to Yandex. metric. What am I doing wrong?

I can't figure out how to set the goal in the metric. The counter is set on all pages.
The goals seem to be written correctly too, data is not transferred to the metric.
5cc33c2bc3957234524552.jpeg5cc33ca838b8a120190599.jpeg5cc33ce06c40d854273151.jpeg5cc33c4d15f4b301646002.jpeg5cc33c5315a43036732885.jpeg5cc33c5750961655426011.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BuTaMuH4uK, 2019-04-28
@BuTaMuH4uK

I am aware that there is such a solution. It is implemented with a timer, if the visit is more than 60 seconds, then the goal is reached.
Solved in this way:
5cc56e085b5a0883492131.jpeg

U
UndineS, 2019-04-27
@UndineS

Try like this:

<script>
window.onload = function() {
if(window.location.href.indexOf("/o-kompanii/") > -1) {
       ym(11002952, 'reachGoal', 'compania');
    }
};
</script>

Only instead of "/o-kompanii/" put the address of your page.
The condition (window.location.href.indexOf("/o-kompanii/") > -1) checks that the address contains the searched substring.
But in general, specifically for this type of goal, the metric has a ready-made solution - the "Page visits" tab (next to the "Javascript event"). Select "url:contains" and enter "o-kompanii" (your address) without quotes.
Instructions from Yandex.Metrika here: https://yandex.ru/support/metrika/general/goal-pag...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question