analytics
HubSpot plugin for Note: This package has moved to @analytics/hubspot
Integration with HubSpot for analytics
Usage
Install analytics
and @analytics/hubspot
packages
npm install analytics @analytics/hubspot
Import and initialize in project
const analytics = /* Track page views */analytics /* Track custom events */analytics /* Identify visitors */analytics
Using identify
Important: HubSpot requires an email
field for making identify calls.
If your identify call does not contain email
HubSpot will not be notified of the new user.
When sending properties with identify
calls, all camelCase
traits are automatically converted to snake_case
. There is one exception to this for firstName
& lastName
which are sent as firstname
& lastname
.
Example:
analytics
Configuration
Plugin Options
Arguments
- pluginConfig
object
- Plugin settings - pluginConfig.portalId
string
- The HubSpot Portal (or Hub) Id of your HubSpot account
Example