Optimised Google Analytics Loading#26349
Closed
coliff wants to merge 1 commit intotwbs:v4-devfrom
coliff:patch-2
Closed
Optimised Google Analytics Loading#26349coliff wants to merge 1 commit intotwbs:v4-devfrom coliff:patch-2
coliff wants to merge 1 commit intotwbs:v4-devfrom
coliff:patch-2
Conversation
Member
|
/CC @mdo. Personally I wouldn't change it, well, because, I see no reason yet. |
Member
|
Cherry-picked into #26732. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
asyncscript attribute will degrade to synchronous loading and execution - but none of those browsers are supported by Bootstrap 4 anyway)