diff --git a/src/connections/sources/catalog/libraries/server/node/index.md b/src/connections/sources/catalog/libraries/server/node/index.md index 71fb8d3f72..bd338ad35f 100644 --- a/src/connections/sources/catalog/libraries/server/node/index.md +++ b/src/connections/sources/catalog/libraries/server/node/index.md @@ -146,7 +146,7 @@ Field | Details `event` _String_ | The name of the event you're tracking. We recommend human-readable names like `Song Played` or `Status Updated`. `properties` _Object, optional_ | A dictionary of properties for the event. If the event was `Product Added`, it might have properties like `price` or `product`. `timestamp` _Date, optional_ | A JavaScript date object representing when the track took place. If the track just happened, leave it out and we'll use the server's time. If you're importing data from the past make sure you to send a `timestamp`. -`context` _Object, optional_ | A dictionary of extra [context](https://segment.com/docs/connections/spec/common/#context) to attach to the call. _Note: `context` differs from `traits` because it is not attributes of the user itself._ +`context` _Object, optional_ | A dictionary of extra [context](/docs/connections/spec/common/#context) to attach to the call. _Note: `context` differs from `traits` because it is not attributes of the user itself._ Find details on **best practices in event naming** as well as the **Track method payload** in the [Segment Spec](/docs/connections/spec/track/). @@ -210,7 +210,7 @@ The Group call has the following fields: Field | Details ----- | -------- `userId` _String, optional_ | The ID for this user in your database. _Note: at least one of `userId` or `anonymousId` must be included in any group call. -`anonymousId` _String, optional_ | An ID associated with the user when you don't know who they are (for example), [the anonymousId generated by `analytics.js`](/docs/connections/sources/catalog/libraries/website/javascript/#anonymous-id)). _Note: at least one of `userId` or `anonymousId` must be included in any group call._ +`anonymousId` _String, optional_ | An ID associated with the user when you don't know who they are (for example), [the anonymousId generated by `analytics.js`](/docs/connections/sources/catalog/libraries/website/javascript/#anonymous-id). _Note: at least one of `userId` or `anonymousId` must be included in any group call._ `groupId` _string | The ID of the group. `traits` _dict, optional_ | A dict of traits you know about the group. For a company, they might be things like `name`, `address`, or `phone`. [Learn more about traits](/docs/connections/spec/group/#traits). `context` _dict, optional_ | A dict containing any context about the request. To see the full reference of supported keys, check them out in the [context reference](/docs/connections/spec/common/#context) @@ -407,8 +407,8 @@ Non-critical plugins run through a timeline that executes in order of insertion | Type | Details ------ | -------- -| `before` | Executes before event processing begins. These are plugins that run before any other plugins run.

For example, validating events before passing them along to other plugins. A failure here could halt the event pipeline.

See the example of how Analytics.js uses the [Event Validation plugin](https://github.com/segmentio/analytics-next/blob/master/packages/browser/src/plugins/validation/index.ts){:target="_blank"} to verify that every event has the correct shape. -| `enrichment` | Executes as the first level of event processing. These plugins modify an event.

See the example of how Analytics.js uses the [Page Enrichment plugin](https://github.com/segmentio/analytics-next/blob/master/packages/browser/src/plugins/page-enrichment/index.ts){:target="_blank"} to enrich every event with page information. +| `before` | Executes before event processing begins. These are plugins that run before any other plugins run.

For example, validating events before passing them along to other plugins. A failure here could halt the event pipeline. +| `enrichment` | Executes as the first level of event processing. These plugins modify an event. | `destination` | Executes as events begin to pass off to destinations.

This doesn't modify the event outside of the specific destination, and failure doesn't halt the execution. | `after` | Executes after all event processing completes. You can use this to perform cleanup operations.

An example of this is the [Segment.io Plugin](https://github.com/segmentio/analytics-next/blob/master/packages/browser/src/plugins/segmentio/index.ts){:target="_blank"} which waits for destinations to succeed or fail so it can send it observability metrics. | `utility` | Executes once during the bootstrap, to give you an outlet to make any modifications as to how Analytics.js works internally. This allows you to augment Analytics.js functionality. @@ -471,7 +471,7 @@ const identityStitching = () => { } ``` -You can view Segment's [existing plugins](https://github.com/segmentio/analytics-next/tree/master/src/plugins){:target="_blank"} to see more examples. +You can view Segment's [existing plugins](https://github.com/segmentio/analytics-next/tree/master/packages/browser/src/plugins){:target="_blank"} to see more examples. ### Register a plugin Registering plugins enable you to modify your analytics implementation to best fit your needs. You can register a plugin using this: