Merge pull request #20071 from overleaf/mf-plans-page-click-currency

[web] Add currency segmentation to all of the `plans-page-click` events

GitOrigin-RevId: d886e4e87817092b51f32733c01d7cc3f15115c8
This commit is contained in:
M Fahru 2024-09-04 06:59:20 -07:00 committed by Copybot
parent 9ed8b82acc
commit fe8b613fab
5 changed files with 15 additions and 7 deletions

View file

@ -282,7 +282,9 @@ mixin table_head_group_total_per_year(groupPlan)
) !{translate("total_per_year_for_x_users", {licenseSize})}
mixin table_head_group_organization(highlighted, eventTrackingKey, additionalEventSegmentation)
- var segmentation = JSON.stringify(Object.assign({}, {button: 'group_organization-link', location: 'table-header-list', period: 'annual'}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: 'group_organization-link', location: 'table-header-list', period: 'annual', currency: recommendedCurrency }
.plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("organization")}
.plans-v2-table-comments-icon
@ -537,7 +539,8 @@ mixin btn_buy_student_university(highlighted, eventTrackingKey, additionalEventS
mixin additional_link_group(eventTrackingKey, additionalEventSegmentation, plan)
- var buttonSegmentation = plan + '-link'
- var segmentation = JSON.stringify(Object.assign({}, {button: buttonSegmentation, location: 'table-header'}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: buttonSegmentation, location: 'table-header', currency: recommendedCurrency }
small.plans-v2-table-th-content-additional-link
| #{translate("or")}
a(
@ -551,7 +554,8 @@ mixin additional_link_group(eventTrackingKey, additionalEventSegmentation, plan)
mixin additional_link_buy(eventTrackingKey, additionalEventSegmentation, plan, period)
- var buttonSegmentation = plan + '-link'
- var segmentation = JSON.stringify(Object.assign({}, {button: buttonSegmentation, location: 'table-header', period}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: buttonSegmentation, location: 'table-header', currency: recommendedCurrency }
- var itmCampaign = itm_campaign ? { itm_campaign } : {itm_campaign: 'plans'}
- var itmReferrer = itm_referrer ? { itm_referrer } : {}
- var qs = new URLSearchParams({planCode: plan, currency: recommendedCurrency, itm_content: 'card', ...itmCampaign, ...itmReferrer})

View file

@ -12,5 +12,5 @@
event-tracking="plans-page-click"
event-tracking-mb="true"
event-tracking-trigger="click"
event-segmentation='{"button": "university-support"}'
event-segmentation={button: "university-support", currency: recommendedCurrency}
) #{translate('show_your_support')}

View file

@ -95,7 +95,8 @@ mixin btn_buy_student_student(highlighted, eventTrackingKey, additionalEventSegm
mixin additional_link_group(eventTrackingKey, additionalEventSegmentation, plan)
- var buttonSegmentation = plan + '-link'
- var segmentation = JSON.stringify(Object.assign({}, {button: buttonSegmentation, location: 'table-header'}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: buttonSegmentation, location: 'table-header' }
a.btn.btn-bg-ghost(
href="/for/contact-sales"
@ -108,7 +109,8 @@ mixin additional_link_group(eventTrackingKey, additionalEventSegmentation, plan)
mixin additional_link_buy(eventTrackingKey, additionalEventSegmentation, plan, period)
- var buttonSegmentation = plan + '-link'
- var segmentation = JSON.stringify(Object.assign({}, {button: buttonSegmentation, location: 'table-header', period}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: buttonSegmentation, location: 'table-header', period }
- var itmCampaign = itm_campaign ? { itm_campaign } : {itm_campaign: 'plans'}
- var itmReferrer = itm_referrer ? { itm_referrer } : {}
- var qs = new URLSearchParams({planCode: plan, currency: recommendedCurrency, itm_content: 'card', ...itmCampaign, ...itmReferrer})

View file

@ -25,7 +25,8 @@ mixin table_short_feature_list_group_professional()
+table_head_group_total_per_year('professional')
mixin table_short_feature_list_group_organization(additionalEventSegmentation)
- var segmentation = JSON.stringify(Object.assign({}, {button: 'group_organization-link', location: 'table-header-list', period: 'annual'}, additionalEventSegmentation))
- additionalEventSegmentation = additionalEventSegmentation || {}
- var segmentation = { ...additionalEventSegmentation, button: 'group_organization-link', location: 'table-header-list', period: 'annual', currency: recommendedCurrency}
ul
li #{translate("best_choices_companies_universities_non_profits")}
li #{translate("for_groups_or_site_wide")}

View file

@ -54,6 +54,7 @@ function setUpSubscriptionTracking(linkEl) {
button: plan,
location,
'billing-period': period,
currency: currentCurrencyCode,
}
eventTracking.sendMB(eventTrackingKey, eventTrackingSegmentation)