Skip to content

Commit

Permalink
Use Matomo plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilyStrelyaev committed Oct 19, 2023
1 parent fd012c0 commit 555b76f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
9 changes: 9 additions & 0 deletions packages/dx-site/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,14 @@ module.exports = {
'gatsby-plugin-react-helmet',
'gatsby-plugin-catch-links',
'gatsby-plugin-sass',
{
resolve: 'gatsby-plugin-matomo',
options: {
siteId: '7',
matomoUrl: 'https://matomo.devexpress.com',
siteUrl: 'https://devexpress.github.io/devextreme-reactive/',
cookieDomain: '*.devexpress.github.io',
},
},
],
};
1 change: 1 addition & 0 deletions packages/dx-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"gatsby-cli": "^2.9.0",
"gatsby-link": "^2.2.29",
"gatsby-plugin-catch-links": "^2.1.26",
"gatsby-plugin-matomo": "^0.16.2",
"gatsby-plugin-react-helmet": "^3.1.22",
"gatsby-plugin-react-svg": "^3.0.0",
"gatsby-plugin-sass": "^2.1.29",
Expand Down
11 changes: 1 addition & 10 deletions packages/dx-site/src/components/layouts/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@ const Layout = ({ children }) => (
titleTemplate={`%s | ${data.site.siteMetadata.title}`}
defaultTitle={data.site.siteMetadata.title}
link={faviconLink}
>
<script>
{`
var _mtm = window._mtm = window._mtm || [];
_mtm.push({ 'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start' });
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true; g.src = 'https://matomo.devexpress.com/js/container_foTT0fJ8.js'; g.setAttributeNode(d.createAttribute('data-ot-ignore')); s.parentNode.insertBefore(g, s);
`}
</script>
</Helmet>
/>
{children}
<Footer />
<Cookie />
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11183,6 +11183,11 @@ gatsby-plugin-catch-links@^2.1.26:
"@babel/runtime" "^7.12.5"
escape-string-regexp "^1.0.5"

gatsby-plugin-matomo@^0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/gatsby-plugin-matomo/-/gatsby-plugin-matomo-0.16.2.tgz#d2abaabeb41022077953c8af0f92b229dc747e61"
integrity sha512-/MMTlhMdzGaNkTQ5j4iCJ2DkTtbHmMRRTYxhZg7XVhOvJmKVUoKjue/sb5M7414V35ZewNz2/mqx+Cj/sKaMZw==

gatsby-plugin-page-creator@^2.10.2:
version "2.10.2"
resolved "https://registry.yarnpkg.com/gatsby-plugin-page-creator/-/gatsby-plugin-page-creator-2.10.2.tgz#808046b292e844447c6539df759b23739ad30c6e"
Expand Down

0 comments on commit 555b76f

Please sign in to comment.