overleaf/services/web/frontend/js/features/editor-navigation-toolbar/components/upgrade-prompt.js
Miguel Serrano c30f887727 Merge pull request #9936 from overleaf/msm-itm-referrer
`itm_referrer` for subscription attribution

GitOrigin-RevId: 2787b55e8b7e9e415e66abef8deb669f3adf0f0d
2022-10-26 08:03:52 +00:00

24 lines
653 B
JavaScript

import { useTranslation } from 'react-i18next'
import * as eventTracking from '../../../infrastructure/event-tracking'
function UpgradePrompt() {
const { t } = useTranslation()
function handleClick(e) {
eventTracking.send('subscription-funnel', 'code-editor', 'upgrade')
eventTracking.sendMB('upgrade-button-click', { source: 'code-editor' })
}
return (
<a
className="toolbar-header-upgrade-prompt btn btn-primary btn-xs"
href="/user/subscription/plans?itm_referrer=editor-header-upgrade-prompt"
target="_blank"
onClick={handleClick}
>
{t('upgrade')}
</a>
)
}
export default UpgradePrompt