Yandex Metrika for Next.js.
npm install next-yandex-metrikaindex.js inside your components directory as YandexMetrika.js, then import inside your Layout or somewhere, and inject this code inside tag:
jsx
yid={YOUR_YM_ID},
clickmap={true/false},
trackLinks={true/false},
accurateTrackBounce={true/false},
webvisor={true/false},
/>
`
Configuration.
- yid: Your Yandex Metrika tag ID.
- clickmap: Boolean, see YM docs, enables clickmap.
- trackLinks: Boolean, see YM docs.
- accurateTrackBounce: Boolean, see YM docs.
- webvisor`: Boolean, see YM docs. Enables webvisor.