Skip to content

Commit

Permalink
Added YandexMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Apr 17, 2024
1 parent f28a9ac commit 54040ed
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,35 @@ export default function RootLayout({ children }) {
</head>
<body>{children}</body>
<Analytics/>
<yadexmat/>

</html>
);
}


export const yadexmeta = async () => {
let i = `
<script>
(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(97056210, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true,
ecommerce:"dataLayer"
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/97056210" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
`
return (
<>
<div dangerouslySetInnerHTML={{ __html : i}}></div>
</>
)}

0 comments on commit 54040ed

Please sign in to comment.