-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Milestone
Description
Description/Screenshot
The properties parameter is of type {[key: string]: string}
| stopTrackEvent(name: string, properties?: {[key: string]: string}, measurements?: {[key: string]: number}): void; |
Per the README.md, "objects are okay too".
ApplicationInsights-JS/README.md
Lines 270 to 284 in ed8632a
| When using stopTrackPage and stopTrackEvent, you can pass in data categorized by types: | |
| Strings: These should be included under the properties field. | |
| Numbers: Add these under the measurements field. | |
| Remember, the order of the properties and measurements should not be altered. You can achieve this using the following code structure: | |
| ```js | |
| appInsights.startTrackEvent("event name"); | |
| appInsights.stopTrackEvent("event name", { | |
| stringProp1: 'string', | |
| stringProp2: {nested:"objects are okay too"} | |
| }, | |
| {numProp1: 3.15, numProp2: 90000} | |
| ) | |
| ``` |
Expected behavior
Testing reveals that nested objects are handled just fine here. Perhaps the signature should be updated to match trackEvent's customProperties parameter of type {[key: string]: any}?
Additional context
All links and testing in version 3.3.3