https://github.com/ndp/gesture_spy
Spy for gestures for your responsive web apps
https://github.com/ndp/gesture_spy
Last synced: 8 months ago
JSON representation
Spy for gestures for your responsive web apps
- Host: GitHub
- URL: https://github.com/ndp/gesture_spy
- Owner: ndp
- Created: 2012-11-29T05:50:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-04-25T21:21:58.000Z (about 11 years ago)
- Last Synced: 2025-02-23T13:40:19.625Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GestureSpy is a simple utility to spy on your users' actions when using touch-based
devices. It captures them and reports them to Google Analytics (or any mechanism
you choose).
This helps answer the questions about how users want to use your site on their
phones and tablets.
* Do they want to zoom in on that picture?
* Are they trying to swipe to see another product?
It's simple to integrate and does not affect the regular site behavior or performance.
## Usage
```
GestureSpy.spy();
```
Then watch your Google Analytics account for the events. All Gesture Spy events will
have their category set to "GestureSpy". In addition:
```
Action Label Value
orientation change landscape or portrait 0
rotate element touched angle
pinch element touched scale, [0,0.9]
zoom element touched scale, [1.1,infinity]
swipe element touched (nothing)
```
Currently it only watches for Safari GestureEvents.
## Other reporting
The default reporting goes to Google Analytics, but you can send information
whereeves:
```
GestureSpy.spy({
report: function(action, label, value) {
...
});
}
```
## Contributing
Please! Pull requests. Or requests.
## References
* http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW1
* http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html
## License
Copyright(c) 2012 Andrew J. Peterson / NDP Software
All Rights Reserved.