-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hey there - I'm in the middle of integrating the intent client in my webapp and seeing inconsistencies between the typescript definitions that come with the lib and the docs. Specifically:
- The docs claim that the second argument to the
trackmethod is an object of properties but the types have the properties nested behind apropertieskey:
// docs
unify.track('event name', { path: location.pathname, foo: 'some-value', ...etc })
// types
unify.track('event name', {properties: { path: location.pathname, foo: 'some-value', ...etc } })
- The docs claim you can add event names to clickTrackingSelectors but the types do not support this signature:
// docs
const autoTrackOptiones = {
clickTrackingSelectors: [
{ selector: 'button#foo', eventName: 'Clicked Foo Button' },
{ selector: 'button#bar', eventName: 'Clicked Bar Button' },
]
}
// types only supports a signature of string[]
const autoTrackOptiones = {
clickTrackingSelectors: [ 'button#foo', 'button#bar']
}
There are other inconsistencies as well. I don't see any changelog or release log in the repo so I can't tell if these features did exist at one time and were removed... or what.
I haven't actually run the code yet to see if the types are incorrect... I assume they are fine and the documentation is wrong. But I figured I'd drop a note to highlight the inconsistencies.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels