Skip to content

IdentitySquare/CookieChimp-Segment-Wrapper

Repository files navigation

CookieChimp Segment Wrapper

Install

npm install @identitysquare/cookiechimp-segment-wrapper
npm install @segment/analytics-next

Usage

import { withCookieChimpCMP } from '@identitysquare/cookiechimp-segment-wrapper'
import { AnalyticsBrowser } from '@segment/analytics-next'

export const analytics = new AnalyticsBrowser()

withCookieChimpCMP(analytics).load({
  writeKey: '<MY_WRITE_KEY>'
})

Always Load Segment

If Segment is a Required vendor, you can enable it to load in opt-in locations before consent is given while ensuring non-required destinations remain blocked.

withCookieChimpCMP(analytics, { alwaysLoadSegment: true }).load({
  writeKey: '<MY_WRITE_KEY>'
})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published