Merge pull request #2907 from overleaf/jel-events-on-optimize-pages

Send Google Analytics event for Optimize pages

GitOrigin-RevId: b43b0a1fa1565b5a75384e7c3335ed5595e3253f
This commit is contained in:
Jessica Lawshe 2020-06-16 08:58:28 -05:00 committed by Copybot
parent a64f9304ab
commit 9c2a6fc371

View file

@ -42,6 +42,7 @@ html(
if gaOptimize === true && typeof(gaOptimizeId) != "undefined"
script(type='text/javascript').
ga('require', '#{gaOptimizeId}')
ga('send', 'event', 'pageview', document.title.substring(0, 499), window.location.href.substring(0, 499))
//- Anti-flicker snippet
style(type='text/css') .async-hide { opacity: 0 !important}
script(type='text/javascript').