Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyyakym committed Jan 21, 2025
1 parent 6556f0d commit 44a49ec
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/analytics-nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This library is an easy plug-and-play solution to enable Prezly Analytics on you
- 🔁 Seamless integration with Segment Analytics
- 🤖 Automatically handles Segment and Google Analytics integrations on your Prezly Newsroom
- 🔒 GDPR-compliant tracking
- 🍪 Ready-made components to handle Cookie Consent
- 🚀 Coming soon: 1st party domain tracking support

# Adding the library to your Next.js application
Expand Down Expand Up @@ -134,6 +133,17 @@ If you want to use a single solution to also track pages unrelated to Prezly, yo
Instead, you would pass `segmentWriteKey` prop to `AnalyticsContextProvider`. This will disable sending events to PrezlyAnalytics and will only send events to Segment.
Note that you need to pass either `segmentWriteKey` or `newsroom` to make the tracking library work.

### Plugins

In order to track to Prezly and Plausible we have created two custom Segment plugins. That means that Segment plays role of an adapter, which also injects Prezly metadata to every event. Google analytics is loaded separately though.

### Cookie consent

You can now pass user cookie consent as a `consent` prop to `AnalyticsProvider`. Consent may include following categories:

- `first-party-analytics` - Allows Prezly and Plausible tracking
- `third-party-cookies` - Is a superset of `first-party-analytics` and also allows Google Analytics

# What's next

You can learn more on how this library can be used by checking the code of [Prezly Bea Theme].
Expand Down

0 comments on commit 44a49ec

Please sign in to comment.