Merge pull request #10013 from overleaf/ii-dashboard-upgrade-button-tracking-data

[web] Project dashboard upgrade button tracking adjustments

GitOrigin-RevId: 8ec7b1a0914db8e167ec0af49f5d4ebd0e23280f
This commit is contained in:
ilkin-overleaf 2022-10-21 14:32:21 +03:00 committed by Copybot
parent b3f98503b7
commit be000f2572
4 changed files with 0 additions and 14 deletions

View file

@ -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"}'

View file

@ -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"}'

View file

@ -10,7 +10,6 @@ function FreePlan() {
)
const handleClick = () => {
eventTracking.send('subscription-funnel', 'dashboard-top', 'upgrade')
eventTracking.sendMB('upgrade-button-click', { source: 'dashboard-top' })
}

View file

@ -21,11 +21,9 @@ describe('<CurrentPlanWidget />', 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('<CurrentPlanWidget />', function () {
})
afterEach(function () {
sendSpy.restore()
sendMBSpy.restore()
})
@ -52,12 +49,6 @@ describe('<CurrentPlanWidget />', 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',