D
D
danilr2019-04-30 08:06:47
JavaScript
danilr, 2019-04-30 08:06:47

Why is Yandex Metrica not connecting?

Why Yandex metric is not connected. This is the main file where all common components and plugins for Vue. Previously, it worked, but something was done and stopped, but I don’t see the difference at all.

var dataBackend = document.getElementById('js-backend-parameters')
if (dataBackend) {
  var yandexMetrixId = +dataBackend.getAttribute('data-yandex-metrika')
}
  Vue.use(VueYandexMetrika, {
    id: dataBackend? yandexMetrixId: 99999,
    router: router,
    env: 'production'
  })

new Vue({
  el: '#app',
  render: h => h(App),
  store,
  router
});

then when I click somewhere I set a goal And such an error. plugin connected like this https://www.npmjs.com/package/@bchteam/vue-yandex-...this.$metrika.reachGoal('open-plan');
5cc7d7c15de79372778067.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moses Fender, 2019-04-30
@mosesfender

There, in the new version, goals are sent like this:

/**
    @var yandexAnaliticID - ID метрики
    @var id - ID сигнала
*/
ym(yandexAnaliticID, 'reachGoal', id);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question