1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-31 03:11:11 +02:00

Randomized the Google Analytics calls to stay under the limit. closes #1916

This commit is contained in:
heff 2015-03-04 17:12:52 -08:00
parent ab84de6960
commit 5b944877ae
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@ CHANGELOG
=========
## HEAD (Unreleased)
_(none)_
* Randomized the Google Analytics calls to stay under the limit ([view](https://github.com/videojs/video.js/pull/1916))
--------------------

View File

@ -11,6 +11,12 @@
;(function(i,w,n,e,l){
l=w.location;
// Google Analytics has a limit of 10 million hits per month for free accounts.
// The Video.js CDN goes over this (by a lot) and they've asked us to stop.
if (Math.random() > 0.01) {
return;
}
// Setting the source of an image will load the URL even without adding to dom
// Using //www, still seems to work for https even though ssl.google is used by google
i.src='//www.google-analytics.com/__utm.gif'