@santech/analytics-core is a npm module that exports segment core bundle of the santech studio
You need to have globally installed:
- node 9.x.x
- npm 5.x.x
- yarn 1.x.x
Install all the dependencies
yarn
Build the package
yarn build
Publish the package
npm publish
npm i @santech/analytics-core -S
Import module
import { analytics } from '@santech/analytics-core';
// or
var analytics = require('@santech/analytics-core').analytics;
// or
var analytics = Santech.AnalyticsCore.analytics;
Angular 1
<script type="text/javascript" src="./node_modules/@santech/analytics-core/dist/umd/index.js"></script>
Santech.AnalyticsCore.analytics.page();
Angular 2
import { analytics } from '@santech/analytics-core';
analytics.page();