README.md in ahoy_events-0.0.2 vs README.md in ahoy_events-0.1.0
- old
+ new
@@ -37,10 +37,16 @@
```javascript
ahoy.track("Viewed book", {title: "The World is Flat"});
```
+or track all views and clicks with:
+
+```javascript
+ahoy.trackAll();
+```
+
#### Ruby
```ruby
ahoy.track "Viewed book", title: "Hot, Flat, and Crowded"
```
@@ -96,10 +102,22 @@
Add as many subscribers as you’d like.
## Reference
+Track view
+
+```javascript
+ahoy.trackView();
+```
+
+Track clicks
+
+```javascript
+ahoy.trackClicks();
+```
+
Track all Rails actions
```ruby
class ApplicationController < ActionController::Base
after_filter :track_action
@@ -110,18 +128,18 @@
ahoy.track "Hit action", request.filtered_parameters
end
end
```
-Use a different model [master]
+Use a different model
```ruby
Ahoy.subscribers << Ahoy::Subscribers::ActiveRecord.new(model: Event)
```
-## TODO
+## History
-- Ability to track JavaScript events automatically (button clicks, etc)
+View the [changelog](https://github.com/ankane/ahoy_events/blob/master/CHANGELOG.md)
## Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help: