File tree Expand file tree Collapse file tree
frontends/lif_advisor_app/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ function loadGtag(): void {
1616 document . head . appendChild ( script ) ;
1717
1818 window . dataLayer = window . dataLayer || [ ] ;
19- // Must use `arguments` (not rest params) — gtag.js checks for Arguments objects in dataLayer
20- // eslint-disable-next-line @typescript-eslint/no-explicit-any, prefer-rest-params
21- window . gtag = function ( ) { ( window . dataLayer as any [ ] ) . push ( arguments ) ; } as any ;
19+ // gtag.js expects the `arguments` object to be pushed into dataLayer (not a rest-parameter array)
20+ // eslint-disable-next-line prefer-rest-params
21+ window . gtag = function ( ) {
22+ window . dataLayer . push ( arguments ) ;
23+ } ;
2224 window . gtag ( 'js' , new Date ( ) ) ;
2325 window . gtag ( 'config' , MEASUREMENT_ID , { anonymize_ip : true } ) ;
2426}
You can’t perform that action at this time.
0 commit comments