Skip to content

Update sample code for Node.js Typewritter #5538

New issue

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

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Conversation

joeynmq
Copy link
Contributor

@joeynmq joeynmq commented Oct 16, 2023

Proposed changes

In the Typewriter Node.js quickstart, there is a code example issuing a Typewriter track call with an example payload that includes two event properties as top-level keys: https://segment.com/docs/protocols/apis-and-extensions/typewriter/#nodejs-quickstart

However, this payload is invalid; the underlying analytics-node package requires a slightly different structure for event params (requires "userId" or "anonymousId" top-level parameters, and event properties must be nested under a key of "properties"): https://github.com/segmentio/analytics-next/tree/master/packages/node#usage

Merge timing

ASAP once approved

@joeynmq joeynmq added the KCS label Oct 16, 2023
@joeynmq joeynmq marked this pull request as ready for review December 4, 2023 00:23
@forstisabella forstisabella merged commit 2c980fe into develop Dec 4, 2023
@forstisabella forstisabella deleted the joeynmq-patch-5 branch December 4, 2023 17:37
Copy link
Contributor

github-actions bot commented Dec 4, 2023

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants