updated Ads
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2024-09-05 23:26:26 +03:00
parent 63e82e5765
commit 691755ac0b
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C

View File

@ -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 (
<>
<script dangerouslySetInnerHTML={{ __html: embedScript }}></script>
<noscript>
<div><img src="https://mc.yandex.ru/watch/98254050" style="position:absolute; left:-9999px;" alt="" /></div>
<div>
<img
src="https://mc.yandex.ru/watch/98254050"
style={{ position: "absolute", left: "-9999px" }}
alt=""
/>
</div>
</noscript>
</>
)
}
export default (() => YandexMetrika) satisfies QuartzComponentConstructor