Skip to content

Commit 6834941

Browse files
committed
chore: fix sending GA events
1 parent f2018e0 commit 6834941

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/CookieConsent/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ const listenForConsent = (state: unknown) => {
2323
if (window._ccRun) return;
2424

2525
window.dataLayer = window.dataLayer || [];
26-
function gtag(arg0: string, arg1: string | Date, arg2?: { [x: string]: string; }) {
27-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
28-
(window as any).dataLayer.push(arg0, arg1, arg2);
26+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, prefer-rest-params
27+
function gtag(..._args: any[]) {
28+
(window as any).dataLayer.push(arguments);
2929
}
3030

3131
gtag('consent', 'default', {

0 commit comments

Comments
 (0)