Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !26349

Optimised Google Analytics Loading

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/coliff/patch-2 into v4-dev Apr 20, 2018
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: coliff

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)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/coliff/patch-2