From 691755ac0b5333b5e8ceae3262a4966210c0dc64 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Thu, 5 Sep 2024 23:26:26 +0300 Subject: [PATCH] updated Ads --- quartz/components/_YandexMetrika.tsx | 33 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/quartz/components/_YandexMetrika.tsx b/quartz/components/_YandexMetrika.tsx index 53623cdc0..cf41b0084 100644 --- a/quartz/components/_YandexMetrika.tsx +++ b/quartz/components/_YandexMetrika.tsx @@ -1,29 +1,34 @@ import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types" -// @ts-ignore - const YandexMetrika: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { const embedScript = ` - (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(); - for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} - 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"); + (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(); + for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} + 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"); - ym(98254050, "init", { - clickmap:true, - trackLinks:true, - accurateTrackBounce:true - }); - ` + ym(98254050, "init", { + clickmap: true, + trackLinks: true, + accurateTrackBounce: true + }); + ` return ( <> ) } + export default (() => YandexMetrika) satisfies QuartzComponentConstructor