feat: Use yaMetrika number in settings
This commit is contained in:
@@ -17,11 +17,11 @@ export function injectYaMetrika() {
|
||||
script.src = '/index.php?route=extension/tgshop/handle/ya_metrika';
|
||||
// script.async = true;
|
||||
document.head.appendChild(script);
|
||||
console.debug('[Init] Yandex Metrika injected to the page.');
|
||||
console.debug('[ym] Yandex Metrika injected to the page.');
|
||||
|
||||
script.onload = () => {
|
||||
window.YA_METRIKA_ID = getMetrikaId();
|
||||
console.debug('[Init] Detected Yandex.Metrika ID:', window.YA_METRIKA_ID);
|
||||
console.debug('[ym] Detected Yandex.Metrika ID:', window.YA_METRIKA_ID);
|
||||
const yaMetrika = useYaMetrikaStore();
|
||||
yaMetrika.initUserParams();
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
Reference in New Issue
Block a user