A
A
Andy Oker2021-05-24 15:41:29
Yandex.Metrica
Andy Oker, 2021-05-24 15:41:29

How to create goals for Yandex.metrics on vue.js?

import VueYandexMetrika from 'vue-yandex-metrika'
Vue.use(VueYandexMetrika, {
  id: 76606560,
  router: router,
  env: "production"
})


I connect the metric. It works on all pages of the application. When checked, the console comes up with:
PageView. Counter 76606560. URL: http://localhost:8080/. Referrer: http://localhost:8080/. Params: []
tag.js:64 Form goal. Counter 76606560. Init.
tag.js:64 User params. Counter 76606560. Params: {"__ymu":{}}


For targets in the dock, there is something like this ym(XXXXXX, 'reachGoal', 'TARGET_NAME);

Where can I get and use this ym?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-05-24
@Ashlis

this.$metrika.reachGoal('TARGET_NAME')
https://github.com/vchaptsev/vue-yandex-metrika/bl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question