Network Information API offers bandwidth and e.g. connection types like 4G
The Network Information interface provides information about the connection a device is using. It offers information about the bandwidth and the type of the connection
In the browser it can be used like this:
var con = navigator.connection || navigator.mozConnection || navigator.webkitConnetion
It returns the effective type of the connection meaning one of ‘slow-2g’, ‘2g’, ‘3g’, or ‘4g’. With
you get the effective bandwidth estimate in megabits per second, rounded to the nearest multiple of 25 kilobits per seconds.
So if you connect this with GTM and run it you get the connection speed of multiple users listed in GA.
Connect with GTM and GA
connect this to to the Google Analytics Tag in GTM as a custom dimention.
The index number needs to be the same as in the definition you do in GA now
Check in Google Analytics
As hinted here the use of Network Information API is limited to some Browsers: