Skip to content

Commit

Permalink
add yandex.metrika
Browse files Browse the repository at this point in the history
  • Loading branch information
seelentov committed Mar 12, 2024
1 parent bc99035 commit d1e9a32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"start": "next start",
"startall": "next build && next-sitemap && next start",
"startall": "next build && next start",
"build": "next build",
"sitemap": "next-sitemap",
"lint": "next lint",
Expand Down
20 changes: 20 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ export default function RootLayout({
return (
<html lang="ru">
<body className={inter.className}>
<script
dangerouslySetInnerHTML={{
__html: `
(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();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(96723379, "init", {
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
`,
}}
/>
<noscript>
<div>
<img src="https://mc.yandex.ru/watch/12345678" style={{ position: 'absolute', left: '-9999px' }} alt="" />
</div>
</noscript>
<Header />
<main className="wrapper">
{children}
Expand Down

0 comments on commit d1e9a32

Please sign in to comment.