Skip to content

Commit

Permalink
SDK-38 Improve the explanation of timestamps in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Dolak committed Jan 3, 2017
1 parent ccf4ae3 commit d08cc26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The identification is performed asynchronously and there is no need to wait for

You may track any event by calling the <code>track()</code> method on the Infinario instance. The <code>track()</code> method takes one mandatory and two optional arguments. First argument is <code>String type</code> which categorizes your event. This argument is <strong>required</strong>. You may choose any string you like.

Next two arguments are <code>Map&lt;String, Object&gt; properties</code> and <code>Long timestamp</code>. Properties is a map which uses <code>String</code> keys and the value may be any <code>Object</code> which is serializable by <code>org.json.JSONObject</code> class. Properties can be used to attach any additional data to the event. Timestamp is standard UNIX timestamp in milliseconds and it can be used to mark the time of the event's occurence. The default timestamp is preset to the time of the tracking of the event.
Next two arguments are <code>Map&lt;String, Object&gt; properties</code> and <code>Long timestamp</code>. Properties is a map which uses <code>String</code> keys and the value may be any <code>Object</code> which is serializable by <code>org.json.JSONObject</code> class. Properties can be used to attach any additional data to the event. Timestamp is in milliseconds since 1970-01-01 00:00:00 GMT and it can be used to mark the time of the event's occurence. The default timestamp is preset to the time of the tracking of the event.
<pre><code>Map&lt;String, Object&gt; properties = new HashMap&lt;&gt;();
properties.put("item_id", 45);
Long timestamp = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ private Map<String, Object> mergeProperties(Map<String, Object> properties, long
*
* @param type event's type
* @param properties event's properties
* @param timestamp event's timestamp in milliseconds
* @param timestamp event's timestamp in milliseconds since 1970-01-01 00:00:00 GMT
* @return success of the operation
*/
public boolean track(String type, Map<String, Object> properties, Long timestamp) {
Expand Down Expand Up @@ -471,7 +471,7 @@ public boolean track(String type, Map<String, Object> properties) {
* Tracks an event for a customer. Cannot be called prior to the identification.
*
* @param type event's type
* @param timestamp event's timestamp in milliseconds
* @param timestamp event's timestamp in milliseconds since 1970-01-01 00:00:00 GMT
* @return success of the operation
*/
public boolean track(String type, Long timestamp) {
Expand Down

0 comments on commit d08cc26

Please sign in to comment.