@mskcc/analytics-plugin-splunk
v0.3.0
Published
<!-- title: MSKCC Splunk Analytics Plugin description: Using the Splunk Analytics -->
Downloads
5
Keywords
Readme
MSKCC Splunk plugin for analytics
Integration with MSKCC Splunk for analytics
For more information see the docs.
Installation
Install analytics
and @mskcc/analytics-plugin-splunk
packages
npm install analytics
npm install @mskcc/analytics-plugin-splunk
pnpm install analytics
pnpm install @mskcc/analytics-plugin-splunk
How to use
The @mskcc/analytics-plugin-splunk
package works in the browser. To use,
install the package, include in your project and initialize the plugin with
analytics.
Below is an example of how to use the browser plugin. Export
// analytics.js
import MSKClickTracking from '@mskcc/analytics-plugin-splunk';
import Analytics from 'analytics';
export default Analytics({
app: 'app-name',
plugins: [
MSKClickTracking({
siteURL: process.env.SPLUNK_URL,
apiKey: process.env.SPLUNK_API,
}),
],
});
// app.js
import analytics from './analytics';
/* Track events */
analytics.track('Here is a test with NPM Analytic Module', {
testProperty: true,
});