customerinsights-web

1.0.9 • Public • Published

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

Package Sidebar

Install

npm i customerinsights-web

Weekly Downloads

5

Version

1.0.9

License

SEE LICENSE IN Customer_Insights_SDK_EULA

Unpacked Size

630 kB

Total Files

5

Last publish

Collaborators

  • haoruiguo
  • britl