Skip to content

Commit 2f08848

Browse files
committed
validate event properties
1 parent 8851628 commit 2f08848

File tree

10 files changed

+564
-135
lines changed

10 files changed

+564
-135
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Unreleased
22

3+
* Validate event properties during logEvent and initialization before sending request.
4+
35
## 2.7.0 (December 1, 2015)
46

57
* If cookies are disabled by user, then fallback to localstorage to save the cookie data.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ amplitude.init('YOUR_API_KEY_HERE', 'USER_ID_HERE');
5454

5555
# Setting Event Properties #
5656

57-
You can attach additional data to any event by passing a Javascript object as the second argument to `logEvent`:
57+
You can attach additional data to any event by passing a Javascript object as the second argument to logEvent. The Javascript object should be in the form of key + value pairs that can be JSON serialized. The keys should be string values. The values can be booleans, strings, numbers, arrays of strings/numbers/booleans, nested Javascript objects, and errors (note you cannot nest arrays or Javascript objects inside array values). The SDK will validate the event properties that you set and will log any errors or warnings to console if there are any issues. Here is an example:
5858

5959
```javascript
6060
var eventProperties = {};

0 commit comments

Comments
 (0)