mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-07 17:32:17 +00:00
Merge pull request #18744 from overleaf/jpa-ce-no-events
[web] avoid sending events in Server Pro/CE GitOrigin-RevId: 04d2fa7939c448bc00757c5015e22a46b6b07bb5
This commit is contained in:
parent
d43292cfe6
commit
be23b7e73b
2 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,7 @@ export const isSmallDevice = window.screen.width < 768
|
|||
|
||||
function sendBeacon(key, data) {
|
||||
if (!navigator || !navigator.sendBeacon) return
|
||||
if (!getMeta('ol-ExposedSettings').isOverleaf) return
|
||||
|
||||
data._csrf = getMeta('ol-csrfToken')
|
||||
const blob = new Blob([JSON.stringify(data)], {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import StartFreeTrialButton from '../../../../frontend/js/shared/components/start-free-trial-button'
|
||||
import getMeta from '@/utils/meta'
|
||||
|
||||
describe('start free trial button', function () {
|
||||
beforeEach(function () {
|
||||
|
@ -8,6 +9,8 @@ describe('start free trial button', function () {
|
|||
cy.intercept('POST', '/event/paywall-click', {
|
||||
statusCode: 204,
|
||||
}).as('event-paywall-click')
|
||||
|
||||
getMeta('ol-ExposedSettings').isOverleaf = true
|
||||
})
|
||||
|
||||
it('renders the button with default text', function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue