-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Official Yandex Metrica template for GTM (Google Tag Manager)
Official Yandex Metrica template for GTM (Google Tag Manager) commit_hash:d3c3e7d64dce872ecbb3a319bef868283c2de0b7
- Loading branch information
enovikov11
committed
Oct 11, 2024
1 parent
c06519a
commit e588a82
Showing
11 changed files
with
1,401 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
{ | ||
"AUTHORS.md":"metrika/frontend/watch-gtm-template/AUTHORS.md", | ||
"LICENSE.md":"metrika/frontend/watch-gtm-template/LICENSE.md" | ||
"CONTRIBUTING.md":"metrika/frontend/watch-gtm-template/CONTRIBUTING.md", | ||
"LICENSE.md":"metrika/frontend/watch-gtm-template/LICENSE.md", | ||
"README.md":"metrika/frontend/watch-gtm-template/README.md", | ||
"SECURITY.md":"metrika/frontend/watch-gtm-template/SECURITY.md", | ||
"img/advanced.png":"metrika/frontend/watch-gtm-template/img/advanced.png", | ||
"img/demo.png":"metrika/frontend/watch-gtm-template/img/demo.png", | ||
"img/subparams.png":"metrika/frontend/watch-gtm-template/img/subparams.png", | ||
"img/subsubparams.png":"metrika/frontend/watch-gtm-template/img/subsubparams.png", | ||
"img/tests.png":"metrika/frontend/watch-gtm-template/img/tests.png", | ||
"metadata.yaml":"metrika/frontend/watch-gtm-template/metadata.yaml", | ||
"template.tpl":"metrika/frontend/watch-gtm-template/template.tpl" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Notice to external contributors | ||
|
||
|
||
## General info | ||
|
||
Hello! In order for us (YANDEX LLC) to accept patches and other contributions from you, you will have to adopt our Yandex Contributor License Agreement (the “**CLA**”). The current version of the CLA can be found here: | ||
1) https://yandex.ru/legal/cla/?lang=en (in English) and | ||
2) https://yandex.ru/legal/cla/?lang=ru (in Russian). | ||
|
||
By adopting the CLA, you state the following: | ||
|
||
* You obviously wish and are willingly licensing your contributions to us for our open source projects under the terms of the CLA, | ||
* You have read the terms and conditions of the CLA and agree with them in full, | ||
* You are legally able to provide and license your contributions as stated, | ||
* We may use your contributions for our open source projects and for any other our project too, | ||
* We rely on your assurances concerning the rights of third parties in relation to your contributions. | ||
|
||
If you agree with these principles, please read and adopt our CLA. By providing us your contributions, you hereby declare that you have already read and adopt our CLA, and we may freely merge your contributions with our corresponding open source project and use it in further in accordance with terms and conditions of the CLA. | ||
|
||
## Provide contributions | ||
|
||
If you have already adopted terms and conditions of the CLA, you are able to provide your contributions. When you submit your pull request, please add the following information into it: | ||
|
||
``` | ||
I hereby agree to the terms of the CLA available at: [link]. | ||
``` | ||
|
||
Replace the bracketed text as follows: | ||
* [link] is the link to the current version of the CLA: https://yandex.ru/legal/cla/?lang=en (in English) or https://yandex.ru/legal/cla/?lang=ru (in Russian). | ||
|
||
It is enough to provide us such notification once. | ||
|
||
## Other questions | ||
|
||
If you have any questions, please mail us at [email protected]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Official Yandex Metrica template for GTM (Google Tag Manager) | ||
|
||
This template adds the [Metrica Tag](https://github.com/yandex/metrica-tag) to your website. To ensure better analytics, trigger it during initialization. | ||
|
||
<img src="./img/demo.png" width="600" alt="Demo"></img> | ||
|
||
### Supported methods | ||
|
||
The template supports all methods from the Metrica JS API as outlined in the [official documentation](https://yandex.com/support/metrica/): | ||
|
||
- [init](https://yandex.com/support/metrica/code/counter-initialize.html) | ||
- [addFileExtension](https://yandex.com/support/metrica/objects/addfileextension.html) | ||
- [extLink](https://yandex.com/support/metrica/objects/extlink.html) | ||
- [file](https://yandex.com/support/metrica/objects/file.html) | ||
- [firstPartyParams](https://yandex.com/support/metrica/objects/first-party-params.html) | ||
- [firstPartyParamsHashed](https://yandex.com/support/metrica/objects/first-party-params-hash.html) | ||
- [hit](https://yandex.com/support/metrica/objects/hit.html) | ||
- [notBounce](https://yandex.com/support/metrica/objects/notbounce.html) | ||
- [params](https://yandex.com/support/metrica/objects/params-method.html) | ||
- [reachGoal](https://yandex.com/support/metrica/objects/reachgoal.html) | ||
- [setUserID](https://yandex.com/support/metrica/objects/set-user-id.html) | ||
- [userParams](https://yandex.com/support/metrica/objects/user-params.html) | ||
|
||
### 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 | ||
|
||
### 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). | ||
|
||
<img src="./img/tests.png" width="600" alt="Tests"></img> | ||
|
||
### Why can’t I see a subparameters? | ||
|
||
Click on "Show advanced settings" to reveal nested fields. Only the nested fields corresponding to the selected radio button will be included in the `data` variable during code execution. | ||
|
||
<img src="./img/advanced.png" width="600" alt="Advanced"></img> | ||
<img src="./img/subparams.png" width="600" alt="Subparams"></img> | ||
<img src="./img/subsubparams.png" width="600" alt="Subsubparams"></img> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Security Policy | ||
|
||
|
||
## Scope and Supported Versions | ||
|
||
The following versions of "Official Yandex Metrica template for GTM (Google Tag Manager)" are currently being supported with security | ||
updates: | ||
|
||
| Version | Supported | | ||
|:-|:-| | ||
| main | ✔️ | | ||
|
||
|
||
## Reporting a Vulnerability | ||
|
||
We're extremely grateful for security researchers and users that report | ||
vulnerabilities to the "Official Yandex Metrica template for GTM (Google Tag Manager)" Open Source Community. All reports are | ||
thoroughly investigated by developers. | ||
|
||
|
||
"Official Yandex Metrica template for GTM (Google Tag Manager)" is the part of ["The Yandex Bug Bounty" program](https://yandex.com/bugbounty/i/rules/). | ||
To report a vulnerability in "Official Yandex Metrica template for GTM (Google Tag Manager)" please send detailed report [using this form](https://yandex.com/bugbounty/i/report/). | ||
|
||
|
||
### When Should I Report a Vulnerability? | ||
|
||
- You think you discovered a potential security vulnerability in "Official Yandex Metrica template for GTM (Google Tag Manager)" | ||
- You are unsure how a vulnerability affects "Official Yandex Metrica template for GTM (Google Tag Manager)" | ||
|
||
|
||
### When Should I NOT Report a Vulnerability? | ||
|
||
- You need help tuning "Official Yandex Metrica template for GTM (Google Tag Manager)" components for security | ||
- You need help applying security related updates | ||
- Your issue is not security related | ||
|
||
|
||
## Security Vulnerability Response | ||
|
||
Each report is acknowledged and analyzed by "Official Yandex Metrica template for GTM (Google Tag Manager)" maintainers within 5 | ||
working days. As the security issue moves from triage, to identified fix, to | ||
release planning we will keep the reporter updated. | ||
|
||
|
||
## Public Disclosure Timing | ||
|
||
A public disclosure date is negotiated by the "Official Yandex Metrica template for GTM (Google Tag Manager)" maintainers and the bug | ||
submitter. We prefer to fully disclose the bug as soon as possible once a user | ||
mitigation is available. It is reasonable to delay disclosure when the bug or | ||
the fix is not yet fully understood, the solution is not well-tested, or for | ||
vendor coordination. The timeframe for disclosure is from immediate to 90 days. | ||
For a vulnerability with a straightforward mitigation, we expect report date to | ||
disclosure date to be on the order of 7 days. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2024 YANDEX LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
homepage: "https://metrica.yandex.com/" | ||
documentation: "https://yandex.com/support/metrica/" | ||
versions: |
Oops, something went wrong.