Prevent analytics script delays from blocking other JS on the page
Oh oops, this is the first script on the page with the `defer` attribute, which means it needs to run before other scripts with `defer`—and in this moment, it's not loading for me, which means the pages aren't working! I assume Plausible told me to use `defer` rather than `async` because it expects the page to be ready; okay! Let's just move this to the very body of the `<head>` instead, so it isn't taking priority over anything else.
This commit is contained in:
parent
d79b6b6c33
commit
3f47f47ced
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,6 @@
|
||||||
%link{href: image_path('favicon.png'), rel: 'icon'}
|
%link{href: image_path('favicon.png'), rel: 'icon'}
|
||||||
= yield :stylesheets
|
= yield :stylesheets
|
||||||
= stylesheet_link_tag "application"
|
= stylesheet_link_tag "application"
|
||||||
= render 'analytics'
|
|
||||||
= yield :meta
|
= yield :meta
|
||||||
= open_graph_tags
|
= open_graph_tags
|
||||||
= csrf_meta_tag
|
= csrf_meta_tag
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
= javascript_include_tag 'application', defer: true
|
= javascript_include_tag 'application', defer: true
|
||||||
= yield :javascripts
|
= yield :javascripts
|
||||||
= yield :head
|
= yield :head
|
||||||
|
= render 'analytics'
|
||||||
%body{:class => body_class}
|
%body{:class => body_class}
|
||||||
#container
|
#container
|
||||||
= yield :before_title
|
= yield :before_title
|
||||||
|
|
Loading…
Reference in a new issue