Skip to content

Commit

Permalink
Merge pull request #662 from input-output-hk/filip/fix/analytics-and-…
Browse files Browse the repository at this point in the history
…minor-changes

filip(fix): add url check for faucet and gtm
  • Loading branch information
fstoqnov-iohk authored Nov 19, 2024
2 parents 381e07a + ba61be7 commit e48e5ba
Show file tree
Hide file tree
Showing 4 changed files with 328 additions and 273 deletions.
7 changes: 7 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,15 @@ const config: Config = {
src: 'https://cmp.osano.com/AzZXI3TYiFWNB5yus/b2ba081d-c77c-4db8-bbf7-46c47e1d7f80/osano.js',
async: false,
},
//GA
{
src: 'https://www.googletagmanager.com/gtag/js?id=G-C4Y892QLL8',
async: false,
},
],

clientModules: [require.resolve('./src/clientModules/gtag.js')],

plugins: [
customWebpackPlugin,
[
Expand Down
11 changes: 11 additions & 0 deletions src/clientModules/gtag.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @ts-nocheck
export default function () {
if (typeof window !== 'undefined') {
window.dataLayer = window.dataLayer || []
function gtag() {
window.dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', 'G-C4Y892QLL8')
}
}
Loading

1 comment on commit e48e5ba

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for cardano-documentation ready!

✅ Preview
https://cardano-documentation-gnyrmj7bk-iog.vercel.app
https://cardano-documentation.vercel.app

Built with commit e48e5ba.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.