This plugin integrates CarrotQuest into your project, allowing to track user interactions and events.
To install the plugin, run:
npm install @hexlet/analytics-plugin-carrotquest
Add plugin to analytics.js following this guide — https://getanalytics.io/plugins/#installation--usage
Provide the plugin with the following configuration. The apiKey
is required and can be found in the CarrotQuest panel. The eventsMapping
allows you to map your project event names to CarrotQuest event names. Mapping for the default properties ($email
, $name
, $phone
) is predefined, but you can override their or add your own with propsMapping
.
Only defined properties and events will be sent to CarrotQuest.
{
apiKey: YOUR_API_KEY,
eventsMapping: {
signed_in: "$authorized",
},
propsMapping: {
email: "$email",
}
}