mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #2451 from overleaf/jel-fix-google-optimize
Move Google Optimize snippet to after analytics create snippet GitOrigin-RevId: 5a7e8dea738c44d30def7d8cd1ee0e4577db80ec
This commit is contained in:
parent
30b9ba4ac7
commit
0125a1f384
1 changed files with 3 additions and 3 deletions
|
@ -35,12 +35,12 @@ html(
|
|||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
if gaOptimize === true && typeof(gaOptimizeId) != "undefined"
|
||||
script(type='text/javascript').
|
||||
ga('require', '#{gaOptimizeId}')
|
||||
script(type='text/javascript').
|
||||
ga('create', '#{gaToken}', '#{settings.cookieDomain.replace(/^\./, "")}');
|
||||
ga('send', 'pageview');
|
||||
if gaOptimize === true && typeof(gaOptimizeId) != "undefined"
|
||||
script(type='text/javascript').
|
||||
ga('require', '#{gaOptimizeId}')
|
||||
- else
|
||||
script(type='text/javascript').
|
||||
window.ga = function() { console.log("would send to GA", arguments) };
|
||||
|
|
Loading…
Reference in a new issue