You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/node/classic.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@ strat: node-js
5
5
hidden: true
6
6
---
7
7
8
-
> warning "Deprecation of Analytics Node.js Classic"
9
-
> On April 1, 2023, Segment will end support for Analytics Node.js Classic, which includes versions 6.2.0 and older. Upgrade to the new version of Analytics Node.js. See the updated [Analytics Node.js docs](/docs/connections/sources/catalog/libraries/server/node) to learn more.
8
+
> info "Upgrade to the new version of Analytics Node.js"
9
+
> Upgrade to the new version of Analytics Node.js. See the updated [Analytics Node.js docs](/docs/connections/sources/catalog/libraries/server/node) to learn more.
10
10
11
11
Segment's Node.js library lets you record analytics data from your node code. The requests hit Segment's servers, and then Segment routes your data to any destinations you have enabled.
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/node/index.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,15 @@ repo: analytics-next
5
5
strat: node-js
6
6
---
7
7
8
+
> info ""
9
+
> This version of Analytics for Node.js is in beta and Segment is actively working on this feature. Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this feature. If you’re using the classic version of Analytics for Node.js, you can refer to the documentation [here](/docs/connections/sources/catalog/libraries/server/node/classic).
10
+
8
11
Segment's Analytics Node.js library lets you record analytics data from your node code. The requests hit Segment's servers, and then Segment routes your data to any destinations you have enabled.
9
12
10
13
The [Segment Analytics Node.js Next library is open-source](https://github.com/segmentio/analytics-next/tree/master/packages/node){:target="_blank"} on GitHub.
11
14
12
15
All of Segment's server-side libraries are built for high-performance, so you can use them in your web server controller code. This library uses an internal queue to make `identify` and `track` calls non-blocking and fast. It also batches messages and flushes asynchronously to Segment's servers.
13
16
14
-
> info "Using Analytics for Node.js Classic?"
15
-
> If you’re still using the classic version of Analytics for Node.js, you can refer to the documentation [here](/docs/connections/sources/catalog/libraries/server/node/classic).
16
-
> <br><br>On April 1, 2023, Segment will end support for Analytics Node.js Classic, which includes versions 6.2.0 and older. Upgrade to new Analytics Node.js. See the updated [Analytics Node.js quickstart guide](/docs/connections/sources/catalog/libraries/server/node/quickstart/) to learn more.
17
-
18
17
## Getting Started
19
18
20
19
> warning ""
@@ -504,7 +503,6 @@ Every method you call **doesn't** result in a HTTP request, but is queued in mem
504
503
505
504
By default, Segment's library will flush:
506
505
507
-
- The very first time it gets a message.
508
506
- Every 15 messages (controlled by `settings.maxEventsInBatch`).
509
507
- If 10 seconds has passed since the last flush (controlled by `settings.flushInterval`)
510
508
@@ -516,7 +514,8 @@ If you don't want to batch messages, you can turn batching off by setting the `m
516
514
const analytics = new Analytics({
517
515
...
518
516
maxEventsInBatch: 1
519
-
});```
517
+
});
518
+
```
520
519
521
520
Batching means that your message might not get sent right away. Every method call takes an optional `callback`, which you can use to know when a particular message is flushed from the queue, like so:
> warning "Deprecation of Analytics Node.js Classic"
8
-
> On April 1, 2023, Segment will end support for [Analytics Node.js Classic](/docs/connections/sources/catalog/libraries/server/node/classic/), which includes versions 6.2.0 and older. Upgrade to new Analytics Node.js. See the [updated Analytics Node.js docs](/docs/connections/sources/catalog/libraries/server/node/) to learn more.
7
+
> info ""
8
+
> This version of Analytics for Node.js is in beta and Segment is actively working on this feature. Segment's [First-Access and Beta terms](https://segment.com/legal/first-access-beta-preview/) govern this feature.
9
+
> <br><br> If you’re using the [classic version of Analytics for Node.js](/docs/connections/sources/catalog/libraries/server/node/classic/), consider upgrading to the [latest Analytics for Node.js library](/docs/connections/sources/catalog/libraries/server/node).
9
10
10
11
This tutorial will help you start sending data from your Node servers to Segment and any destination, using Segment's Node library. Check out the full documentation for [Analytics Node.js](/docs/connections/sources/catalog/libraries/server/node) to learn more.
0 commit comments