[web] Add unified-access-footer-click event (#30189)

* Add event `unified-access-footer-click`

* Remove redundant `page` segmentation

Co-authored-by: @copilot
GitOrigin-RevId: 81ba64d09e29466fb73f200859805b6e17990dca
This commit is contained in:
Antoine Clausse
2025-12-10 09:05:35 +00:00
committed by Copybot
co-authored by @copilot
parent c903c70d0a
commit 549840f3a3
2 changed files with 66 additions and 1 deletions
+44 -1
View File
@@ -17,6 +17,14 @@ mixin ciamCardFooter(short)
href='https://www.digital-science.com/'
target='_blank'
rel='noopener noreferrer'
event-tracking-mb='true'
event-tracking='unified-access-footer-click'
event-tracking-trigger='click'
event-segmentation={
product: 'overleaf',
item: 'logo',
destinationUrl: 'https://www.digital-science.com/',
}
)
img(
src=buildImgPath('digital-science/digital-science.svg')
@@ -26,7 +34,42 @@ mixin ciamCardFooter(short)
if short
| !{translate('overleaf_is_a_ds_product')}
else
| !{translate('advancing_research_with', null, [{ name: 'a', attrs: { href: 'https://www.overleaf.com/', target: '_blank', rel: 'noopener noreferrer' }}, { name: 'a', attrs: { href: 'https://www.papersapp.com/', target: '_blank', rel: 'noopener noreferrer' }}])}
-
const linkArgs = [
{
name: 'a',
attrs: {
href: 'https://www.overleaf.com/',
target: '_blank',
rel: 'noopener noreferrer',
'event-tracking-mb': 'true',
'event-tracking': 'unified-access-footer-click',
'event-tracking-trigger': 'click',
'event-segmentation': {
product: 'overleaf',
item: 'overleaf',
destinationUrl: 'https://www.overleaf.com/'
}
}
},
{
name: 'a',
attrs: {
href: 'https://www.papersapp.com/',
target: '_blank',
rel: 'noopener noreferrer',
'event-tracking-mb': 'true',
'event-tracking': 'unified-access-footer-click',
'event-tracking-trigger': 'click',
'event-segmentation': {
product: 'overleaf',
item: 'papers',
destinationUrl: 'https://www.papersapp.com/'
}
}
}
]
| !{translate('advancing_research_with', null, linkArgs)}
mixin ciamTermsOfServiceAgreement
p
@@ -1,5 +1,6 @@
import React, { FC, ReactNode } from 'react'
import { Trans } from 'react-i18next'
import * as eventTracking from '@/infrastructure/event-tracking'
import dsLogo from '@/shared/svgs/digital-science.svg'
type Props = { children: ReactNode }
@@ -22,6 +23,13 @@ const CiamLayout: FC<Props> = ({ children }: Props) => (
target="_blank"
rel="noopener noreferrer"
className="ciam-image-link"
onClick={() =>
eventTracking.sendMB('unified-access-footer-click', {
product: 'overleaf',
item: 'logo',
destinationUrl: 'https://www.digital-science.com/',
})
}
>
<img src={dsLogo} alt="Digital Science — home" />
</a>
@@ -35,12 +43,26 @@ const CiamLayout: FC<Props> = ({ children }: Props) => (
href="https://www.overleaf.com/"
target="_blank"
rel="noopener noreferrer"
onClick={() =>
eventTracking.sendMB('unified-access-footer-click', {
product: 'overleaf',
item: 'overleaf',
destinationUrl: 'https://www.overleaf.com/',
})
}
/>,
// eslint-disable-next-line jsx-a11y/anchor-has-content,react/jsx-key
<a
href="https://www.papersapp.com/"
target="_blank"
rel="noopener noreferrer"
onClick={() =>
eventTracking.sendMB('unified-access-footer-click', {
product: 'overleaf',
item: 'papers',
destinationUrl: 'https://www.papersapp.com/',
})
}
/>,
]}
/>