ya metrika

This commit is contained in:
Sergey Yarkov 2020-09-25 22:21:19 +03:00
parent 52b43b5394
commit 5b49757c6b
3 changed files with 23 additions and 0 deletions

View File

@ -39,6 +39,23 @@ module.exports = {
}, },
}, },
}, },
{
resolve: `gatsby-plugin-yandex-metrika`,
options: {
// The ID of yandex metrika.
trackingId: 67663189,
// Enabled a webvisor. The default value is `false`.
webvisor: true,
// Enables tracking a hash in URL. The default value is `false`.
trackHash: true,
// Defines where to place the tracking script - `false` means before body (slower loading, more hits)
// and `true` means after the body (faster loading, less hits). The default value is `false`.
afterBody: true,
// Use `defer` attribute of metrika script. If set to `false` - script will be loaded with `async` attribute.
// Async enables earlier loading of the metrika but it can negatively affect page loading speed. The default value is `false`.
defer: false,
},
},
"gatsby-plugin-sitemap", "gatsby-plugin-sitemap",
{ {
resolve: "gatsby-plugin-robots-txt", resolve: "gatsby-plugin-robots-txt",

5
package-lock.json generated
View File

@ -9355,6 +9355,11 @@
"babel-plugin-remove-graphql-queries": "^2.9.7" "babel-plugin-remove-graphql-queries": "^2.9.7"
} }
}, },
"gatsby-plugin-yandex-metrika": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/gatsby-plugin-yandex-metrika/-/gatsby-plugin-yandex-metrika-2.5.0.tgz",
"integrity": "sha512-2dJr9qpAwrKJTNGtr5FJDMIkQd3Kd5l4iNOMGZodvfe5uv7lgy9WH7uoFDeeFSvsg7cg+SKAKETPN1hEUry+zg=="
},
"gatsby-react-router-scroll": { "gatsby-react-router-scroll": {
"version": "3.0.7", "version": "3.0.7",
"resolved": "https://registry.npmjs.org/gatsby-react-router-scroll/-/gatsby-react-router-scroll-3.0.7.tgz", "resolved": "https://registry.npmjs.org/gatsby-react-router-scroll/-/gatsby-react-router-scroll-3.0.7.tgz",

View File

@ -35,6 +35,7 @@
"gatsby-plugin-sass": "^2.3.7", "gatsby-plugin-sass": "^2.3.7",
"gatsby-plugin-sharp": "^2.6.17", "gatsby-plugin-sharp": "^2.6.17",
"gatsby-plugin-sitemap": "^2.4.11", "gatsby-plugin-sitemap": "^2.4.11",
"gatsby-plugin-yandex-metrika": "^2.5.0",
"gatsby-remark-autolink-headers": "^2.3.10", "gatsby-remark-autolink-headers": "^2.3.10",
"gatsby-remark-copy-linked-files": "^2.3.11", "gatsby-remark-copy-linked-files": "^2.3.11",
"gatsby-remark-images": "^3.3.17", "gatsby-remark-images": "^3.3.17",