File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
22import { siteMetadata } from ' ../constants.ts' ;
33
4- const GTAG_ID = siteMetadata .google .gtag ;
5- const GTAG_SRC = ` https://www.googletagmanager.com/gtag/js?id=${GTAG_ID } ` ;
4+ const GTAG_IDS = siteMetadata .google .gtags ;
5+ const GTAG_SRC = ` https://www.googletagmanager.com/gtag/js?id=${GTAG_IDS [ 0 ] } ` ;
66---
77
88<!-- Google tag (gtag.js) -->
99<script async src ={ GTAG_SRC } ></script >
10- <script define:vars ={ { GTAG_ID }} >
10+ <script define:vars ={ { GTAG_IDS }} >
1111window.dataLayer = window.dataLayer || [];
1212function gtag() {
1313 // biome-ignore lint/complexity/noArguments: keep arguments object as per gtag.js spec
1414 dataLayer.push(arguments);
1515}
1616gtag('js', new Date());
1717
18- gtag('config', GTAG_ID);
18+ GTAG_IDS.forEach((gtagId) => {
19+ gtag('config', gtagId);
20+ });
1921</script >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const siteMetadata = {
1313 site : 'https://setchy.io' ,
1414 } ,
1515 google : {
16- gtag : 'G-736BKHY5WS' ,
16+ gtags : [ 'G-736BKHY5WS' ] ,
1717 siteVerification : '' ,
1818 } ,
1919 menuLinks : [
You can’t perform that action at this time.
0 commit comments