Skip to content

Optimised Google Analytics Loading#26349

Closed
coliff wants to merge 1 commit intotwbs:v4-devfrom
coliff:patch-2
Closed

Optimised Google Analytics Loading#26349
coliff wants to merge 1 commit intotwbs:v4-devfrom
coliff:patch-2

Conversation

@coliff
Copy link
Copy Markdown
Contributor

@coliff coliff commented Apr 20, 2018

The Google Analytics script currently on getbootstrap.com is loaded and executed asynchronously on all browsers but has the disadvantage of not allowing modern browsers to preload the script.

The alternative async tracking snippet in this PR adds support for preloading, which will provide a small performance boost on modern browsers.

This script implementation is provided and supported by Google:
https://developers.google.com/analytics/devguides/collection/analyticsjs/#alternative_async_tracking_snippet

(Very old browsers that do not recognize the async script attribute will degrade to synchronous loading and execution - but none of those browsers are supported by Bootstrap 4 anyway)

@XhmikosR
Copy link
Copy Markdown
Member

/CC @mdo. Personally I wouldn't change it, well, because, I see no reason yet.

@mdo
Copy link
Copy Markdown
Member

mdo commented Jun 25, 2018

Cherry-picked into #26732. Thanks!

@mdo mdo closed this Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants