Permalink
Browse files

chore: add GA note to primary readme (#4481)

  • Loading branch information...
mmcc authored and gkatsev committed Oct 31, 2017
1 parent 93e7670 commit e2af3223131957e48871b09307c856f717d9d7b5
Showing with 16 additions and 1 deletion.
  1. +16 −1 README.md
View
@@ -25,9 +25,24 @@ Thanks to the awesome folks over at [Fastly][fastly], there's a free, CDN hosted
<link href="//vjs.zencdn.net/5.19/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/5.19/video.min.js"></script>
```
> For the latest version of video.js and URLs to use, check out the [Getting Started][getting-started] page on our website.
> In the `vjs.zencdn.net` CDN-hosted versions of Video.js we include a [stripped down Google Analytics pixel](https://github.com/videojs/cdn/blob/master/src/analytics.js) that tracks a random sampling (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 via the free CDN:
>
> ```html
> <script>window.HELP_IMPROVE_VIDEOJS = false;</script>
> ```
> Alternatively, you can include Video.js by getting it from [npm](http://videojs.com/getting-started/#download-npm), downloading from [GitHub releases](https://github.com/videojs/video.js/releases) or by including it via [unpkg](https://unpkg.com) or another JavaScript CDN like CDNjs. These releases *do not* include Google Analytics tracking at all.
> ```html
> <!-- unpkg -->
> <link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
> <script src="https://unpkg.com/video.js/dist/video.js"><script>
>
> <!-- cdnjs -->
> <link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.3.3/video-js.css" rel="stylesheet">
> <script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.3.3/video.js"><script>
> ```
Next, using Video.js is as simple as creating a `<video>` element, but with an additional `data-setup` attribute. At a minimum, this attribute must have a value of `'{}'`, but it can include any Video.js [options][options] - just make sure it contains valid JSON!
```html

0 comments on commit e2af322

Please sign in to comment.