1.0.9 • Published 2 years ago

customerinsights-web v1.0.9

Weekly downloads
-
License
SEE LICENSE IN Cu...
Repository
-
Last release
2 years ago

Microsoft Customer Insights Web SDK

Setup with NPM

import { Analytics } from 'customerinsights-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