D
D
Dmitry Prozorov2014-02-05 14:01:27
JavaScript
Dmitry Prozorov, 2014-02-05 14:01:27

How to set the “Scrolled to the bottom of the page” goal in Yandex.Metrica?

What event should be tracked to inform Ya.M about the achievement of this goal?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin T, 2014-02-05
@prozoroviy

Try to use the jquery scroll event, upon reaching the footer, you can execute the js function from the Yandex.Metrics API
As an example, this code can serve:

$(window).scroll(function () {
    if ($(window).scrollTop() + $(window).height() > $('.footer').offset().top) {
        yaCounterXXXXXX.reachGoal('TARGET_NAME');
    }
});

D
Dmitry Prozorov, 2014-02-05
@prozoroviy

Screen%20Shot%202014-02-05%20at%2015.37.
There is a solution :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question