mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-19 18:14:06 +00:00
Merge pull request #6418 from overleaf/ta-ga-optimize-remove
Cleanup Google Optimize GitOrigin-RevId: d8cf8008179ad2c355c09f06d947fb2b89cf5a3c
This commit is contained in:
parent
a13dee04c6
commit
b2e18c92a6
5 changed files with 0 additions and 39 deletions
|
@ -57,8 +57,6 @@ async function plansPage(req, res) {
|
|||
res.render('subscriptions/plans-marketing', {
|
||||
title: 'plans_and_pricing',
|
||||
plans,
|
||||
gaExperiments: Settings.gaExperiments.plansPage,
|
||||
gaOptimize: true,
|
||||
itm_content: req.query && req.query.itm_content,
|
||||
recomendedCurrency: recommendedCurrency,
|
||||
recommendedCurrency,
|
||||
|
@ -116,7 +114,6 @@ async function paymentPage(req, res) {
|
|||
}),
|
||||
showCouponField: !!req.query.scf,
|
||||
showVatField: !!req.query.svf,
|
||||
gaOptimize: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -284,7 +284,6 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
|||
Settings.analytics &&
|
||||
Settings.analytics.ga &&
|
||||
Settings.analytics.ga.tokenV4
|
||||
res.locals.gaOptimizeId = _.get(Settings, ['analytics', 'gaOptimize', 'id'])
|
||||
next()
|
||||
})
|
||||
|
||||
|
|
|
@ -13,9 +13,6 @@ html(
|
|||
head
|
||||
include ./_metadata.pug
|
||||
|
||||
if (typeof(gaExperiments) != "undefined")
|
||||
|!{gaExperiments}
|
||||
|
||||
//- Stylesheet
|
||||
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation)), id="main-stylesheet")
|
||||
block css
|
||||
|
@ -53,20 +50,6 @@ html(
|
|||
})
|
||||
}
|
||||
} catch (e) {}
|
||||
if gaOptimize === true && typeof(gaOptimizeId) != "undefined"
|
||||
//- Anti-flicker snippet
|
||||
style(type='text/css') .async-hide { opacity: 0 !important}
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
if (!ga.isBlocked) {
|
||||
ga('require', '#{gaOptimizeId}');
|
||||
ga('send', 'event', 'pageview', document.title.substring(0, 499), window.location.href.substring(0, 499));
|
||||
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
|
||||
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
|
||||
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
|
||||
})(window,document.documentElement,'async-hide','dataLayer',4000,
|
||||
{'#{gaOptimizeId}':true});
|
||||
}
|
||||
|
||||
else
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
window.ga = function() { console.log("would send to GA", arguments) };
|
||||
|
|
|
@ -10,9 +10,6 @@ html(
|
|||
head
|
||||
include ./_metadata.pug
|
||||
|
||||
if (typeof(gaExperiments) != "undefined")
|
||||
|!{gaExperiments}
|
||||
|
||||
//- Stylesheet
|
||||
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation)), id="main-stylesheet")
|
||||
block css
|
||||
|
@ -50,20 +47,6 @@ html(
|
|||
})
|
||||
}
|
||||
} catch (e) {}
|
||||
if gaOptimize === true && typeof(gaOptimizeId) != "undefined"
|
||||
//- Anti-flicker snippet
|
||||
style(type='text/css') .async-hide { opacity: 0 !important}
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
if (!ga.isBlocked) {
|
||||
ga('require', '#{gaOptimizeId}');
|
||||
ga('send', 'event', 'pageview', document.title.substring(0, 499), window.location.href.substring(0, 499));
|
||||
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
|
||||
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
|
||||
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
|
||||
})(window,document.documentElement,'async-hide','dataLayer',4000,
|
||||
{'#{gaOptimizeId}':true});
|
||||
}
|
||||
|
||||
else
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
window.ga = function() { console.log("would send to GA", arguments) };
|
||||
|
|
|
@ -116,7 +116,6 @@ describe('SubscriptionController', function () {
|
|||
},
|
||||
},
|
||||
siteUrl: 'http://de.sharelatex.dev:3000',
|
||||
gaExperiments: {},
|
||||
}
|
||||
this.GeoIpLookup = {
|
||||
isValidCurrencyParam: sinon.stub().returns(true),
|
||||
|
|
Loading…
Reference in a new issue