From be000f257286f526b3298e9f9c0b86951b3de479 Mon Sep 17 00:00:00 2001 From: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com> Date: Fri, 21 Oct 2022 14:32:21 +0300 Subject: [PATCH] Merge pull request #10013 from overleaf/ii-dashboard-upgrade-button-tracking-data [web] Project dashboard upgrade button tracking adjustments GitOrigin-RevId: 8ec7b1a0914db8e167ec0af49f5d4ebd0e23280f --- services/web/app/views/layout/navbar-marketing.pug | 2 -- .../web/app/views/project/list/_current_plan_mixins.pug | 2 -- .../components/current-plan-widget/free-plan.tsx | 1 - .../project-list/components/current-plan-widget.test.tsx | 9 --------- 4 files changed, 14 deletions(-) diff --git a/services/web/app/views/layout/navbar-marketing.pug b/services/web/app/views/layout/navbar-marketing.pug index 15ac810ff8..5f23cd1f83 100644 --- a/services/web/app/views/layout/navbar-marketing.pug +++ b/services/web/app/views/layout/navbar-marketing.pug @@ -14,8 +14,6 @@ nav.navbar.navbar-default.navbar-main href="/user/subscription/plans" event-tracking="upgrade-button-click" event-tracking-mb="true" - event-tracking-ga="subscription-funnel" - event-tracking-action="dashboard-top" event-tracking-label="upgrade" event-tracking-trigger="click" event-segmentation='{"source": "dashboard-top"}' diff --git a/services/web/app/views/project/list/_current_plan_mixins.pug b/services/web/app/views/project/list/_current_plan_mixins.pug index f1f99cb831..c851aae292 100644 --- a/services/web/app/views/project/list/_current_plan_mixins.pug +++ b/services/web/app/views/project/list/_current_plan_mixins.pug @@ -83,8 +83,6 @@ mixin free_plan() href="/user/subscription/plans" event-tracking="upgrade-button-click" event-tracking-mb="true" - event-tracking-ga="subscription-funnel" - event-tracking-action="dashboard-top" event-tracking-label="upgrade" event-tracking-trigger="click" event-segmentation='{"source": "dashboard-top"}' diff --git a/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx b/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx index f13f52c089..013dc5863d 100644 --- a/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx +++ b/services/web/frontend/js/features/project-list/components/current-plan-widget/free-plan.tsx @@ -10,7 +10,6 @@ function FreePlan() { ) const handleClick = () => { - eventTracking.send('subscription-funnel', 'dashboard-top', 'upgrade') eventTracking.sendMB('upgrade-button-click', { source: 'dashboard-top' }) } diff --git a/services/web/test/frontend/features/project-list/components/current-plan-widget.test.tsx b/services/web/test/frontend/features/project-list/components/current-plan-widget.test.tsx index 04fd5e42d2..4c3d6125f6 100644 --- a/services/web/test/frontend/features/project-list/components/current-plan-widget.test.tsx +++ b/services/web/test/frontend/features/project-list/components/current-plan-widget.test.tsx @@ -21,11 +21,9 @@ describe('', function () { }) describe('free plan', function () { - let sendSpy: sinon.SinonSpy let sendMBSpy: sinon.SinonSpy beforeEach(function () { - sendSpy = sinon.spy(eventTracking, 'send') sendMBSpy = sinon.spy(eventTracking, 'sendMB') window.metaAttributesCache.set('ol-usersBestSubscription', { @@ -36,7 +34,6 @@ describe('', function () { }) afterEach(function () { - sendSpy.restore() sendMBSpy.restore() }) @@ -52,12 +49,6 @@ describe('', function () { it('clicks on upgrade button', function () { const upgradeLink = screen.getByRole('link', { name: /upgrade/i }) fireEvent.click(upgradeLink) - expect(sendSpy).to.be.calledOnce - expect(sendSpy).calledWith( - 'subscription-funnel', - 'dashboard-top', - 'upgrade' - ) expect(sendMBSpy).to.be.calledOnce expect(sendMBSpy).calledWith('upgrade-button-click', { source: 'dashboard-top',