Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ You can download the Video.js source and host it on your own servers, or use the
<script src="//vjs.zencdn.net/4.12/video.js"></script>
```

We include a stripped down Google Analytics pixel that tracks a random percentage (currently 1%) of players loaded from the CDN. This allows us to see (roughly) what browsers are in use in the wild, along with other useful metrics such as OS and device. If you'd like to disable analytics, you can simply include the following global **before** including Video.js:

```js
window.VIDEOJS_NO_ANALYTICS = true;
```


## Install via package manager

Expand Down
6 changes: 5 additions & 1 deletion src/js/cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
* @type {Image}
*/
;(function(i,w,n,e,l){
// Allow people to disable CDN tracking themselves by specifying a global
// (VIDEOJS_NO_ANALYTICS) as true
if (w.VIDEOJS_NO_ANALYTICS) return;

l=w.location;

// Google Analytics has a limit of 10 million hits per month for free accounts.
Expand Down Expand Up @@ -59,4 +63,4 @@
// Custom Var: vjsv is the variable name and 1.0.0 is the VJS version
+'&utme=8(vjsv)9(v0.0.0)'
;
})(new Image(),window,navigator,encodeURIComponent);
})(new Image(),window,navigator,encodeURIComponent);