0.0.1 • Published 8 months ago

@identitysquare/cookiechimp-segment-wrapper v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

CookieChimp Segment Wrapper

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

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>'
})