analytics-plugin-customerio

0.1.7 • Public • Published

Customer.io plugin for analytics

Note: This package has moved to @analytics/customerio

Integration with customer.io for analytics package.

View the docs

Usage

Install analytics and analytics-plugin-customerio packages

npm install analytics analytics-plugin-customerio

Import and initialize in project

import Analytics from 'analytics'
import customerIOPlugin from '@analytics/customerio'

const analytics = Analytics({
  app: 'awesome-app',
  plugins: [
    customerIOPlugin({
      siteId: '123-xyz'
    })
  ]
})

/* Track page views */
analytics.page()

/* Track custom events */
analytics.track('buttonClicked')

/* Identify visitors */
analytics.identify('user-xzy-123', {
  name: 'Bill Murray',
  cool: true
})

Plugin Options

Arguments

  • pluginConfig object - Plugin settings
  • pluginConfig.siteId string - Customer.io site Id for client side tracking

Example

customerIOPlugin({
  siteId: '123-xyz'
})

See the full list of analytics provider plugins in the main repo.

Package Sidebar

Install

npm i analytics-plugin-customerio

Weekly Downloads

1

Version

0.1.7

License

MIT

Unpacked Size

23 kB

Total Files

9

Last publish

Collaborators

  • davidwells