diff --git a/types/google.analytics/google.analytics-tests.ts b/types/google.analytics/google.analytics-tests.ts index 63ca4e5ca4..6246ef923e 100644 --- a/types/google.analytics/google.analytics-tests.ts +++ b/types/google.analytics/google.analytics-tests.ts @@ -106,6 +106,9 @@ describe("tester Google Analytics Code _gaq object", () => { _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']); + // more details: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking#_trackevent + _gaq.push(['_trackEvent', 'category', 'action_name', undefined, undefined, true]); + _gaq.push(() => { const tracker = _gat._getTrackerByName('UA-65432-1'); tracker._trackPageview(); diff --git a/types/google.analytics/index.d.ts b/types/google.analytics/index.d.ts index 9f522b3b9b..4f68ca4d84 100644 --- a/types/google.analytics/index.d.ts +++ b/types/google.analytics/index.d.ts @@ -19,7 +19,7 @@ declare class Tracker { } interface GoogleAnalyticsCode { - push(commandArray: string[]): void; + push(commandArray: Array): void; push(func: Function): void; }