We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
options
The segment trackEvent supports an extra options argument. https://segment.com/docs/sources/website/analytics.js/#track
trackEvent
I'd love some way to support this in the segment adapter.
In the meantime I've done something like this in the app where I need it:
import SegmentAdapter from 'ember-metrics/metrics-adapters/segment'; import canUseDOM from 'ember-metrics/utils/can-use-dom'; import { compact } from 'ember-metrics/utils/object-transforms'; export default SegmentAdapter.extend({ toStringExtension() { return 'segment-extended'; }, trackEvent(options = {}) { const compactedOptions = compact(options); const { event, segmentOptions } = compactedOptions; delete compactedOptions.event; delete compactedOptions.segmentOptions; if (canUseDOM) { window.analytics.track(event, compactedOptions, segmentOptions); } } });
I'd be happy to add tests and do something like this in the current Segment adapter.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The segment
trackEvent
supports an extraoptions
argument. https://segment.com/docs/sources/website/analytics.js/#trackI'd love some way to support this in the segment adapter.
In the meantime I've done something like this in the app where I need it:
I'd be happy to add tests and do something like this in the current Segment adapter.
The text was updated successfully, but these errors were encountered: