Skip to content

Official Yandex Metrica template for GTM (Google Tag Manager)

License

Notifications You must be signed in to change notification settings

yandex/metrica-gtm-template

Repository files navigation

Official Yandex Metrica template for GTM (Google Tag Manager)

This template adds the Metrica Tag to your website. To ensure better analytics, trigger it during initialization.

Demo

Supported methods

The template supports all methods from the Metrica JS API as outlined in the official documentation:

Features

  • 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.

For Developers

If you are Yandex employee please visit https://nda.ya.ru/t/20Cds6lt7ASopm for additional info about project

How to submit a Pull Request

  1. Fork the repository.
  2. Import the template.tpl into your GTM interface.
  3. Make your changes.
  4. Run tests and write if neccesary.
  5. Export the updated template.tpl.
  6. Replace the existing file.
  7. Accept the Yandex Contributor License Agreement (CLA).
  8. Submit a Pull Request (PR).

Tests

About

Official Yandex Metrica template for GTM (Google Tag Manager)

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages