This commit is contained in:
parent
63e82e5765
commit
691755ac0b
@ -1,6 +1,4 @@
|
|||||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||||
// @ts-ignore
|
|
||||||
|
|
||||||
|
|
||||||
const YandexMetrika: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
|
const YandexMetrika: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => {
|
||||||
const embedScript = `
|
const embedScript = `
|
||||||
@ -11,9 +9,9 @@ const YandexMetrika: QuartzComponent = ({ displayClass, cfg }: QuartzComponentPr
|
|||||||
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
||||||
|
|
||||||
ym(98254050, "init", {
|
ym(98254050, "init", {
|
||||||
clickmap:true,
|
clickmap: true,
|
||||||
trackLinks:true,
|
trackLinks: true,
|
||||||
accurateTrackBounce:true
|
accurateTrackBounce: true
|
||||||
});
|
});
|
||||||
`
|
`
|
||||||
|
|
||||||
@ -21,9 +19,16 @@ const YandexMetrika: QuartzComponent = ({ displayClass, cfg }: QuartzComponentPr
|
|||||||
<>
|
<>
|
||||||
<script dangerouslySetInnerHTML={{ __html: embedScript }}></script>
|
<script dangerouslySetInnerHTML={{ __html: embedScript }}></script>
|
||||||
<noscript>
|
<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>
|
</noscript>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (() => YandexMetrika) satisfies QuartzComponentConstructor
|
export default (() => YandexMetrika) satisfies QuartzComponentConstructor
|
||||||
|
Loading…
Reference in New Issue
Block a user