{"repo":"v-doronin/next-yandex-metrica","free":true,"listed":false,"github":"https://github.com/v-doronin/next-yandex-metrica","clone":"git clone https://github.com/v-doronin/next-yandex-metrica.git","description":"Yandex Metrica integration for Next.js","language":"TypeScript","stars":44,"topics":["analytics","nextjs","yandex-metrica","yandex-metrika"],"license":"MIT","category":"analytics","readme_excerpt":"Next.js Yandex Metrica Yandex Metrica integration for Next.js Usage Add the provider Pages router App router Note: YandexMetricaProvider uses the \"use client\" directive. YandexMetricaProvider Props Name Description ------------------------- ------------------------------------------------------------------------------------------------------------------------------------ tagID Yandex.Metrica tag ID. strategy next/script loading strategy. Defaults to afterInteractive . initParameters Yandex.Metrica tag initialization parameters. shouldUseAlternativeCDN Use the alternative CDN to load Yandex.Metrica. router app or pages Yandex.Metrica tag ID is read from the tagID property and the NEXT PUBLIC YANDEX METRICA ID environment variable. If both are set, the provider property takes priority. Send events next/router pageviews are tracked automatically. The package provides useMetrica hook for sending custom analytics events. The returned functions accept the same parameters as those found in the Yandex.Metrica object methods. All functions are automatically provided with the tag ID that is supplied to the provider or the environment variable. useMetrica hook exposes functions for calling notBounce , reachGoal , setUserID , and userParams without specifying the event name. Other methods can be called using the ymEvent function, with the event name as the first argument. In both cases, all event parameters are type-checked. In case if you need to use the Yandex.Metrica object directly, ","default_branch":null,"files":null,"tree":[],"storefront":"/r/v-doronin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/v-doronin/next-yandex-metrica/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}