Skip to content

Commit

Permalink
docs:update google script (#5199)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 authored Nov 8, 2024
1 parent 349f20f commit 90e5c28
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,27 @@ const config = {
})();
`,
},
{
tagName: 'script',
innerHTML: `
(function (w, d, s, l, i) {
w[l] = w[l] || []
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : ''
j.async = true
j.src = 'https://www.googletagmanager.com/gtag/js?id=' + i + dl
f.parentNode.insertBefore(j, f)
// Initialize dataLayer and gtag function
window.dataLayer = window.dataLayer || []
function gtag () { dataLayer.push(arguments) }
gtag('js', new Date())
gtag('config', 'G-YF5VHZSTE0')
})(window, document, 'script', 'dataLayer', 'G-YF5VHZSTE0')
`,
}
],
preBodyTags: [
{
Expand Down

0 comments on commit 90e5c28

Please sign in to comment.