diff --git a/app/assets/javascripts/account/AccountService.js.coffee b/app/assets/javascripts/account/AccountService.js.coffee index 49bb3637f..6527eb1f0 100644 --- a/app/assets/javascripts/account/AccountService.js.coffee +++ b/app/assets/javascripts/account/AccountService.js.coffee @@ -91,12 +91,13 @@ AccountService = ( Service._reformatDOB() return true ).catch((response) -> - # for errors we manually stop the loading overlay + AnalyticsService.trackEvent("login_failed", { user_id: null, origin: 'Application Sign In', error_reason: response?.reason || undefined, }) + # for errors we manually stop the loading overlay bsLoadingOverlayService.stop() return false ) diff --git a/app/javascript/__tests__/hooks/useGTMDataLayer.test.tsx b/app/javascript/__tests__/hooks/useGTMDataLayer.test.tsx index 74054d847..cf73c9cb1 100644 --- a/app/javascript/__tests__/hooks/useGTMDataLayer.test.tsx +++ b/app/javascript/__tests__/hooks/useGTMDataLayer.test.tsx @@ -46,7 +46,7 @@ describe("useGTMDataLayer", () => { expect(consoleSpy).toHaveBeenCalled() }) - it("errors out when no event is provided in the data object", () => { + it("errors out when an event property is provided in the data object", () => { const event = "testEvent" const data = { test: "data", event: "testEvent" }