Skip to content

Commit

Permalink
Adding readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain Nash committed Jan 6, 2012
1 parent cffa832 commit ff65c15
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 1,64 @@
Visitor.js
==

Open-Source version of visitor.js.

To use: include the file visitor.js, then access the visitor object.
For async loading, use the window.visitor_loaded callback.

To add more fields, add more modules torwards the bottom of the js file.

API demo dump:
```
{
"locale": "en-US",
"cur_session": {
"visits": 1,
"search": {
"engine": null,
"query": null
},
"referrer": "http://localhost:8000/",
"url": "http://localhost:8000/demo.html",
"path": "/demo.html",
"start": 1325887305691,
"last_visit": 1325887305691
},
"orig_session": {
"visits": 2,
"search": {
"engine": null,
"query": null
},
"referrer": "http://localhost:8000/",
"url": "http://localhost:8000/test_visitor.html",
"path": "/test_visitor.html",
"start": 1325886709703,
"last_visit": 1325887305692
},
"browser": {
"browser": "Chrome",
"version": 16,
"OS": "Mac"
},
"plugins": {
"flash": true,
"silverlight": true,
"java": true,
"quicktime": true
},
"device": {
"screen": {
"height": 1024,
"width": 1280,
},
"viewport": {
"width": 1206,
"height": 816
},
"is_phone": false,
"is_tablet": false,
"is_mobile": false
}
}
```

0 comments on commit ff65c15

Please sign in to comment.