Skip to content

Commit 00dbd3a

Browse files
committed
Add next.js example
1 parent 5b9390b commit 00dbd3a

File tree

1 file changed

+12
-3
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+12
-3
lines changed

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -950,17 +950,26 @@ The Segment Inspector is composed of these three components:
950950
- This tab enables you to see the information of a user if you're using the `identify` feature. You can associate the data to an individual and measure their activity across multiple sessions and devices. This tab only shows the user's traits that are on the client.
951951
- If you're not using the `identify` feature, the user remains anonymous.
952952

953+
## Usage in Common Frameworks & SPAs
954+
Note: these examples assume analytics is installed via [npm](https://github.com/segmentio/analytics-next/tree/master/packages/browser)
953955

954-
## Open source libraries
955956

956-
Analytics.js 2.0 includes the following open source components:
957+
### Next.js
958+
- [with-segment-analytics](https://github.com/vercel/next.js/tree/canary/examples/with-segment-analytics){:target="_blank”}
959+
- [with-segment-analytics-pages-router](https://github.com/vercel/next.js/tree/canary/examples/with-segment-analytics-pages-router){:target="_blank”}
960+
961+
### Vanilla React, Vue, etc
962+
See [Usage in Common Frameworks & SPAs](https://github.com/segmentio/analytics-next/tree/master/packages/browser#examples--usage-in-common-frameworks-and-spas)
963+
964+
## External dependencies
965+
966+
Analytics.js 2.0 includes the following open source dependencies:
957967

958968
**uuid v2.0.0** ([https://github.com/lukeed/uuid](https://github.com/lukeed/uuid))
959969
Copyright Luke Edwards <[[email protected]](mailto:[email protected])> ([lukeed.com](https://lukeed.com/))
960970
License: MIT License, available here: [https://github.com/lukeed/uuid/blob/master/license](https://github.com/lukeed/uuid/blob/master/license)
961971

962972

963-
964973
**dset v2.0.1** ([https://github.com/lukeed/dset](https://github.com/lukeed/dset))
965974
Copyright (c) Luke Edwards <[[email protected]](mailto:[email protected])> ([lukeed.com](https://lukeed.com/))
966975
License: MIT License, available here: [https://github.com/lukeed/dset/blob/master/license](https://github.com/lukeed/dset/blob/master/license)

0 commit comments

Comments
 (0)