Permalink
Browse files

Updating readme with info about reset() method

  • Loading branch information...
1 parent dc64b30 commit 73dffa736d0d03e601ac3254c6a26211574d4707 Rob Flaherty committed Jul 29, 2015
Showing with 6 additions and 2 deletions.
  1. +4 −0 README.md
  2. +2 −2 screentime.js
View
@@ -51,6 +51,10 @@ Setting this to true (default is false) will send a Google Analytics event for e
#### `callback` function
The callback function that receives the screentime data.
+## Methods
+#### `reset`
+Calling `$.screentime.reset()` will reset the counter. This is useful for Single Page Applications where the page context is reloaded client side.
+
## Posting the data
The built-in Google Analytics option is an easy way to quickly start collecting screentime data, but it's not exactly scalable. For each field that has data to report, a separate GA Event has to be sent. If you're only tracking 2 or 3 fields, this is probably fine. But anything more than that and you might start hitting the [GA collection limit](https://developers.google.com/analytics/devguides/collection/gajs/limits-quotas).
View
@@ -1,7 +1,7 @@
/*!
* @preserve
- * Screentime.js | v0.1
- * Copyright (c) 2014 Rob Flaherty (@robflaherty)
+ * Screentime.js | v0.2
+ * Copyright (c) 2015 Rob Flaherty (@robflaherty)
* Licensed under the MIT and GPL licenses.
*/

0 comments on commit 73dffa7

Please sign in to comment.