├── .gitignore ├── beaverbird.png ├── test ├── node.js └── index.html ├── bower.json ├── package.json ├── docs └── BeaverBird.md ├── README.md ├── beaverbird.min.js ├── beaverbird.svg └── beaverbird.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /beaverbird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arselzer/BeaverBird/HEAD/beaverbird.png -------------------------------------------------------------------------------- /test/node.js: -------------------------------------------------------------------------------- 1 | // Just tests if the module.exports works 2 | var BB = require("../beaverbird.js") 3 | 4 | console.log(BB) 5 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "beaverbird", 3 | "main": "beaverbird.js", 4 | "version": "0.5.1", 5 | "authors": [ 6 | "Alexander Selzer " 7 | ], 8 | "description": "all-in-one user tracking", 9 | "keywords": [ 10 | "tracking", 11 | "canvas", 12 | "fonts" 13 | ], 14 | "license": "MIT", 15 | "homepage": "http://beaverbird.com", 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/AlexanderSelzer/beaverbird.git" 19 | }, 20 | "ignore": [ 21 | "beaverbird.png", 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test", 26 | "tests" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "beaverbird", 3 | "version": "0.5.1", 4 | "description": "all-in-one user tracking", 5 | "main": "beaverbird.js", 6 | "directories": { 7 | "doc": "docs", 8 | "test": "test" 9 | }, 10 | "scripts": { 11 | "test": "echo \"Error: no test specified\" && exit 1" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "https://github.com/AlexanderSelzer/beaverbird.git" 16 | }, 17 | "author": "Alexander Selzer (http://alexselzer.com/)", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/AlexanderSelzer/beaverbird/issues" 21 | }, 22 | "homepage": "https://github.com/AlexanderSelzer/beaverbird", 23 | "dependencies": { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/BeaverBird.md: -------------------------------------------------------------------------------- 1 | # BeaverBird 2 | 3 | ## BeaverBird.uid() 4 | 5 | Retrieve a unique id. 6 | 7 | Warning: the unique string will change as BeaverBird adds more tracking methods. 8 | If the major version (x.0.0) changes, or the minor (0.x.0) changes while the major is 9 | not yet 1, it can be expected that the output is different. 10 | 11 | ## BeaverBird.match(uid) -> boolean 12 | 13 | Check if the user id matches the id of the current user. 14 | 15 | ## BeaverBird.screen() 16 | 17 | Returns data of the computer's screen. 18 | 19 | `{width, height, colorDepth, pixelDepth}` 20 | 21 | ## BeaverBird.browser() 22 | 23 | `{userAgent, cookies, java, dnt, lang}` 24 | 25 | ## BeaverBird.plugins() 26 | 27 | Get a list of browser plugins. 28 | Returns a map of name -> Plugin 29 | 30 | ## BeaverBird.pluginNames() 31 | 32 | Get a list of only the plugin names. 33 | 34 | ## BeaverBird.canvas() 35 | 36 | Returns the canvas fingerprint (a crc32 hash, string) 37 | 38 | ## BeaverBird.matchCanvas(canvas) -> boolean 39 | 40 | Checks if the canvas fingerprint matches the current client's. 41 | 42 | ## BeaverBird.fonts(overrideFonts[]) 43 | 44 | If `fonts` is defined, the default fonts will not be used, 45 | otherwise, the default list of fonts will be used. 46 | 47 | ## BeaverBird.matchFonts(fonts[]) -> boolean 48 | 49 | Checks if the lists of fonts are exactly the same 50 | 51 | ## BeaverBird.data() 52 | returns a list of all tracking data that could be extracted. 53 | ``` 54 | { 55 | canvasFingerprint 56 | fonts 57 | browser 58 | plugins 59 | screen 60 | webgl: 61 | } 62 | ``` 63 | 64 | ## BeaverBird.clearCache() 65 | 66 | While it is not recommended to access the retrieving functions repeatedly (nor makes it much sense), 67 | this will guard against possible performance issues. 68 | It often makes semantic sense to .match() and then .id() in a real scenario. This makes that use case perform well. 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Beaverbird 2 | ======== 3 | 4 | ![Always there, tracking you](https://raw.githubusercontent.com/AlexanderSelzer/beaverbird/master/beaverbird.png) 5 | 6 | There is no more such thing as untracked behaviour on the web. 7 | 8 | BeaverBird takes a step to simplify the techniques that would otherwise be reimplemented again and again 9 | in private by some big companies desperately needing "insight into their customers' interactions with their sites (and others)". 10 | 11 | ## Examples 12 | 13 | ```JavaScript 14 | // Get a unique user id 15 | var uid = BeaverBird.uid() 16 | 17 | // Get all data that could be extracted by BeaverBird 18 | var data = BeaverBird.data() 19 | 20 | // Collect canvas fingerprints 21 | var canvasFingerprint = BeaverBird.canvas() 22 | 23 | // Get a list of installed fonts 24 | var fonts = BeaverBird.fonts() 25 | console.log(fonts.indexOf("Arial") !== -1) 26 | 27 | // List all browser plugins 28 | var browserPlugins = BeaverBird.plugins() 29 | var hasiPhoto = (plugins.indexOf("iPhotoPhotocast") !== -1) 30 | 31 | // Use WebGL information 32 | var webGlStuff = BeaverBird.webgl() 33 | 34 | ``` 35 | 36 | ## Getting BeaverBird 37 | 38 | There are three ways of using BeaverBird. If unsure, just choose the first. 39 | 40 | 1. Download [the latest release](https://github.com/AlexanderSelzer/BeaverBird/releases) 41 | 42 | 2. Install from npm: `npm install --save beaverbird` 43 | 44 | 3. Install with bower: `bower install --save beaverbird` 45 | 46 | 47 | Include it in a `