From 9c2a6fc3717a6428cb3a236d2d63a2a86c528240 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Tue, 16 Jun 2020 08:58:28 -0500 Subject: [PATCH] Merge pull request #2907 from overleaf/jel-events-on-optimize-pages Send Google Analytics event for Optimize pages GitOrigin-RevId: b43b0a1fa1565b5a75384e7c3335ed5595e3253f --- services/web/app/views/layout.pug | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/app/views/layout.pug b/services/web/app/views/layout.pug index dcd712f983..811b9e974b 100644 --- a/services/web/app/views/layout.pug +++ b/services/web/app/views/layout.pug @@ -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').