FullStory plugin for 'analytics' module
npm install analytics-plugin-fullstoryanalytics> Note: This package has moved to @analytics/fullstory
Integration with FullStory for analytics
- Usage
- Formatting Identify & Tracking payloads
- Configuration
- Plugin Options
Install analytics and analytics-plugin-fullstory packages
``bash`
npm install analytics
npm install analytics-plugin-fullstory
Import and initialize in project
`js
import Analytics from 'analytics'
import fullStoryPlugin from 'analytics-plugin-fullstory'
const analytics = Analytics({
app: 'awesome-app',
plugins: [
fullStoryPlugin({
/ org name from Full Story settings /
org: 'ABCDE'
})
]
})
/ Track custom events /
analytics.track('itemPurchased', {
price: 11.50,
is_user: true
})
/ Identify visitors /
analytics.identify('user-xzy-123', {
email: 'bill@murray.com',
accountLevel: 'pro'
})
`
Full story requires specific naming conventions for tracking.
We have taken the liberty of making this easier to use with this plugin. 🎉
Values sent to Full Story will be automatically converted into a values their API will understand.
Example
`js`
analytics.track('itemPurchased', {
price: 11.11,
is_user: true,
first_name: 'steve'
})
This tracking payload will be automatically converted to the fullstory naming conventions and will be sent like:
`js`
FS.event('itemPurchased', {
price_real: 11.11,
isUser_bool: true,
firstName_str: 'steve'
})
This will ensure data flows into full story correctly.
Below are the configuration options for the analytics full story plugin.
You will need your org ID from full story setting to connect to your account.
First, find your FullStory account's org ID by clicking on Settings > FullStory Setup. and viewing the _fs_org value.
Arguments
- pluginConfig object - Plugin settings
- pluginConfig.org string - FullStory account's org ID. The _fs_org value in settings.
Example
`js``
fullStoryPlugin({
org: 'your-org-name'
})