Skip to content

Commit f07bc7b

Browse files
committed
try catch around log messages. validate event properties. create utils module
1 parent 2bb711e commit f07bc7b

File tree

10 files changed

+552
-141
lines changed

10 files changed

+552
-141
lines changed

CHANGELOG.md

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

33
* Fix bug where saveReferrer throws exception if sessionStorage is disabled.
4+
* Log messages with a try/catch to support IE 8.
5+
* Validate event properties during logEvent and initialization before sending request.
46

57
## 2.9.0 (January 15, 2016)
68

README.md

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

5959
# Setting Event Properties #
6060

61-
You can attach additional data to any event by passing a Javascript object as the second argument to `logEvent`:
61+
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:
6262

6363
```javascript
6464
var eventProperties = {};

0 commit comments

Comments
 (0)