Add is-screen-width-less-than-768px to the upgrade-button-click event (#11506)

GitOrigin-RevId: 33ae53d7959863017607d3e1ea237602aed626dc
This commit is contained in:
M Fahru 2023-01-30 10:17:03 -07:00 committed by Copybot
parent 3507463c4e
commit 78304e7c94
5 changed files with 14 additions and 6 deletions

View file

@ -17,7 +17,7 @@ nav.navbar.navbar-default.navbar-main
event-tracking-mb="true"
event-tracking-label="upgrade"
event-tracking-trigger="click"
event-segmentation='{"source": "dashboard-top", "project-dashboard-react": "enabled", "is-dashboard-sidebar-hidden": "true"}'
event-segmentation='{"source": "dashboard-top", "project-dashboard-react": "enabled", "is-dashboard-sidebar-hidden": "true", "is-screen-width-less-than-768px": "true"}'
) #{translate("upgrade")}
if settings.nav.custom_logo
a(href='/', aria-label=settings.appName, style='background-image:url("'+settings.nav.custom_logo+'")').navbar-brand

View file

@ -108,9 +108,5 @@ mixin free_plan()
|
a.btn.btn-primary(
href="/user/subscription/plans?itm_referrer=project-dashboard-upgrade-prompt"
event-tracking="upgrade-button-click"
event-tracking-mb="true"
event-tracking-label="upgrade"
event-tracking-trigger="click"
event-segmentation='{"source": "dashboard-top", "project-dashboard-react": "default", "is-dashboard-sidebar-hidden": "false"}'
ng-click="sendUpgradeButtonClickEvent()"
) Upgrade

View file

@ -18,6 +18,7 @@ function FreePlan({ featuresPageURL }: FreePlanProps) {
source: 'dashboard-top',
'project-dashboard-react': 'enabled',
'is-dashboard-sidebar-hidden': false,
'is-screen-width-less-than-768px': false,
})
}

View file

@ -821,6 +821,16 @@ App.controller(
$scope.downloadSelectedProjects = () =>
$scope.downloadProjectsById($scope.getSelectedProjectIds())
$scope.sendUpgradeButtonClickEvent = () => {
eventTracking.sendMB('upgrade-button-click', {
source: 'dashboard-top',
'project-dashboard-react': 'default',
'is-dashboard-sidebar-hidden': false,
'is-screen-width-less-than-768px':
window.matchMedia('(max-width: 767px)').matches,
})
}
$scope.downloadProjectsById = function (projectIds) {
let path
eventTracking.send(

View file

@ -55,6 +55,7 @@ describe('<CurrentPlanWidget />', function () {
page: '/',
'project-dashboard-react': 'enabled',
'is-dashboard-sidebar-hidden': false,
'is-screen-width-less-than-768px': false,
})
})
})