This template adds the Metrica Tag to your website. To ensure better analytics, trigger it during initialization.
The template supports all methods from the Metrica JS API as outlined in the official documentation:
- init
- addFileExtension
- extLink
- file
- firstPartyParams
- firstPartyParamsHashed
- hit
- notBounce
- params
- reachGoal
- setUserID
- userParams
- Simple mode for easy integration, and expert mode for accessing all functions and parameters.
- Execution of custom callback code from the template’s sandboxed JavaScript is not supported in GTM for security reasons.
- Configurable via parameters — no need for boilerplate universal code.
- Includes GTM tests to validate the template’s internal code.
- Debug mode to verify correct functionality and installation.
If you are Yandex employee please visit https://nda.ya.ru/t/20Cds6lt7ASopm for additional info about project
- Fork the repository.
- Import the
template.tpl
into your GTM interface. - Make your changes.
- Run tests and write if neccesary.
- Export the updated
template.tpl
. - Replace the existing file.
- Accept the Yandex Contributor License Agreement (CLA).
- Submit a Pull Request (PR).