Включаем yandex-метрику только на production
This commit is contained in:
@@ -6,7 +6,7 @@ const api = axios.create({
|
||||
|
||||
class Misc {
|
||||
async loadConfig() {
|
||||
const response = await api.post('/config', {params: ['name', 'version', 'mode', 'maxUploadFileSize']});
|
||||
const response = await api.post('/config', {params: ['name', 'version', 'mode', 'maxUploadFileSize', 'branch']});
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class App extends Vue {
|
||||
}
|
||||
|
||||
//yandex-метрика для omnireader
|
||||
if (this.mode == 'omnireader' && !this.yaMetricsDone) {
|
||||
if (this.config.branch == 'production' && this.mode == 'omnireader' && !this.yaMetricsDone) {
|
||||
(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();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");// eslint-disable-line no-unexpected-multiline
|
||||
|
||||
Reference in New Issue
Block a user