Skip to content

Commit 56d5114

Browse files
author
Pablo Vieira
committed
(pwa): preload GA script
1 parent 014609c commit 56d5114

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

_includes/analytics.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{% if site.ga_tracking_code %}
22
<!-- Google Analytics -->
33
<script>
4-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8-
4+
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
95
ga('create', '{{ site.ga_tracking_code }}', 'auto');
106
ga('send', 'pageview');
117
</script>
8+
<script async src='https://www.google-analytics.com/analytics.js'></script>
129
<!-- Google Analytics end -->
1310
{% endif %}
1411

0 commit comments

Comments
 (0)