pgrippi / ember-cli-google-analytics

Ember CLI addon that adds the Google Analytics tracking code
MIT License
38 stars 31 forks source link

Addon places javascript above CSS code #15

Open Kilowhisky opened 8 years ago

Kilowhisky commented 8 years ago

I'm not sure if this is a quite a bug since it may not appear when bootstrapping but it appears that this plugin adds code to the 'head' instead of the 'head-footer'.

When you place code in the 'head' you are injecting it before the included CSS files which causes chrome to not be able to async download the CSS files.

See https://developers.google.com/speed/pagespeed/module/filter-css-above-scripts https://stackoverflow.com/questions/9271276/is-the-recommendation-to-include-css-before-javascript-invalid

This error came up as a warning in google chrome page speed audit FYI.