engagementinsights-web
v1.0.3
Published
Engagement Insights Web SDK
Downloads
19
Readme
Microsoft Engagement Insights Web SDK
About Engagement Insights
Getting Started with Engagement Insights
Engagement insights enables you to understand interactively, how your customers are using your services and products on websites, mobile apps, and connected products. Combine behavioral analytics with transactional, demographic, survey, and other data types from Microsoft Dynamics 365 Customer Insights.
Using the engagement insights JavaScript library on your website generates “View” and “Action” events, which power engagement insights out-of-the-box web analytics reports to see who’s coming to your website and what they’re doing.
Log custom events and build your own reports for richer insights on how your website is being used.
Setup with NPM
import { Analytics } from 'engagementinsights-web';
var analytics = new Analytics();
const config = {
ingestionKey: 'YOUR-INGESTIONKEY'
autoCapture:{
view: true // set true if you wish to auto-collect page view signals
click: true // set true if you wish to auto-collect page click signals
}
}
analytics.initialize(config);
To track custom events:
const event = {
name: "cart_checkout",
version: "1.0.0",
properties: {
"item_model": "CoffeeMachine",
"model_year": 2010,
"cost": 700,
}
}
analytics.trackEvent(event);
Sample App
https://docs.microsoft.com/en-us/dynamics365/customer-insights/engagement-insights/websdk-sample