mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2958 from overleaf/jel-optimize-zotero
Add Optimize variant on Zotero paywall prompt GitOrigin-RevId: 005cf27d40a367e4617c399023204dacb80af8de
This commit is contained in:
parent
d8d3ac82e9
commit
1cac5227d6
3 changed files with 16 additions and 9 deletions
|
@ -766,6 +766,9 @@ const ProjectController = {
|
|||
}
|
||||
metrics.inc(metricName)
|
||||
|
||||
const enableOptimize =
|
||||
!!Settings.experimentId && !user.features.zotero
|
||||
|
||||
res.render('project/editor', {
|
||||
title: project.name,
|
||||
priority_title: true,
|
||||
|
@ -822,7 +825,8 @@ const ProjectController = {
|
|||
allowedImageNames,
|
||||
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl,
|
||||
wsUrl,
|
||||
showSupport: Features.hasFeature('support')
|
||||
showSupport: Features.hasFeature('support'),
|
||||
gaOptimize: enableOptimize
|
||||
})
|
||||
timer.done()
|
||||
}
|
||||
|
|
|
@ -354,6 +354,7 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
|
|||
|
||||
webRouter.use(function(req, res, next) {
|
||||
res.locals.ExposedSettings = {
|
||||
experimentId: Settings.experimentId,
|
||||
isOverleaf: Settings.overleaf != null,
|
||||
appName: Settings.appName,
|
||||
hasSamlBeta: req.session.samlBeta,
|
||||
|
|
|
@ -43,7 +43,9 @@ html(
|
|||
script(type='text/javascript').
|
||||
ga('require', '#{gaOptimizeId}')
|
||||
ga('send', 'event', 'pageview', document.title.substring(0, 499), window.location.href.substring(0, 499))
|
||||
if !experimentId
|
||||
//- Anti-flicker snippet
|
||||
//- Only run for tests controlled by Optimize editor
|
||||
style(type='text/css') .async-hide { opacity: 0 !important}
|
||||
script(type='text/javascript').
|
||||
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
|
||||
|
|
Loading…
Reference in a new issue