mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #26901 from overleaf/rh-hotjar-marketing
Add hotjar tracking to marketing pages GitOrigin-RevId: 5490392b44a287e4853778416323b3aa5fbfc1ef
This commit is contained in:
@@ -6,6 +6,7 @@ import ErrorController from '../Errors/ErrorController.js'
|
||||
import SessionManager from '../Authentication/SessionManager.js'
|
||||
import { expressify } from '@overleaf/promise-utils'
|
||||
import logger from '@overleaf/logger'
|
||||
import SplitTestHandler from '../SplitTests/SplitTestHandler.js'
|
||||
|
||||
const __dirname = new URL('.', import.meta.url).pathname
|
||||
|
||||
@@ -31,7 +32,15 @@ async function home(req, res) {
|
||||
page: req.path,
|
||||
})
|
||||
|
||||
res.render('external/home/index')
|
||||
const hotjarAssignment = await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'hotjar-marketing'
|
||||
)
|
||||
|
||||
res.render('external/home/index', {
|
||||
shouldLoadHotjar: hotjarAssignment?.variant === 'enabled',
|
||||
})
|
||||
} else {
|
||||
res.redirect('/login')
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ include ./_mixins/bootstrap_js
|
||||
block entrypointVar
|
||||
- entrypoint = 'marketing'
|
||||
|
||||
block append meta
|
||||
meta(name='ol-shouldLoadHotjar' data-type='boolean' content=shouldLoadHotjar)
|
||||
|
||||
block body
|
||||
if typeof suppressNavbar == 'undefined'
|
||||
if bootstrapVersion === 5
|
||||
|
||||
@@ -30,7 +30,8 @@ function setConsent(value) {
|
||||
if (
|
||||
getMeta('ol-ExposedSettings').gaToken ||
|
||||
getMeta('ol-ExposedSettings').gaTokenV4 ||
|
||||
getMeta('ol-ExposedSettings').propensityId
|
||||
getMeta('ol-ExposedSettings').propensityId ||
|
||||
getMeta('ol-ExposedSettings').hotjarId
|
||||
) {
|
||||
document
|
||||
.querySelectorAll('[data-ol-cookie-banner-set-consent]')
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import './utils/webpack-public-path'
|
||||
import './infrastructure/error-reporter'
|
||||
import './infrastructure/hotjar'
|
||||
import './features/form-helpers/hydrate-form'
|
||||
import './features/form-helpers/password-visibility'
|
||||
import './features/link-helpers/slow-link'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import '../../marketing'
|
||||
import '@/infrastructure/hotjar'
|
||||
|
||||
function homepageAnimation(homepageAnimationEl) {
|
||||
function createFrames(word, { buildTime, holdTime, breakTime }) {
|
||||
|
||||
Reference in New Issue
Block a user