analytics-plugin-customerio
v0.1.7
Published
Customer.io integration for 'analytics' module
Downloads
22
Maintainers
Readme
Customer.io plugin for analytics
Note: This package has moved to @analytics/customerio
Integration with customer.io for analytics package.
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.