Skip to content

cdp-analytics-browser 0.1.2

Install from the command line:
Learn more about npm packages
$ npm install @customerio/cdp-analytics-browser@0.1.2
Install via package.json:
"@customerio/cdp-analytics-browser": "0.1.2"

About this version

Customer.io Data Pipelines analytics client for browsers.

Installation

npm install @customerio/cdp-analytics-browser

Usage

import { AnalyticsBrowser } from '@customerio/cdp-analytics-browser'

const analytics = AnalyticsBrowser.load({ writeKey: '<YOUR_WRITE_KEY>' })

analytics.identify('hello world')

document.body?.addEventListener('click', () => {
  analytics.track('document body clicked!')
})

Other Regions

If you're in our EU data center you will need to specify an alternate endpoint:

import { AnalyticsBrowser } from '@customerio/cdp-analytics-browser'

const analytics = AnalyticsBrowser.load({
  cdnURL: 'https://cdp-eu.customer.io',
  writeKey: '<YOUR_WRITE_KEY>'
})

analytics.identify('hello world')

Details


Assets

  • cdp-analytics-browser-0.1.2.tgz

Download activity

  • Total downloads 8,860
  • Last 30 days 1,355
  • Last week 285
  • Today 43