mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[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:
committed by
Copybot
co-authored by
@copilot
parent
c903c70d0a
commit
549840f3a3
@@ -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/',
|
||||
})
|
||||
}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user