@mskcc/analytics-plugin-splunk-rest
v0.2.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/splunk-clicktracking
packages
npm install analytics
npm install @mskcc/splunk-clicktracking
pnpm install analytics
pnpm install @mskcc/splunk-clicktracking
How to use
The @mskcc/splunk-clicktracking
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 'clicktracking';
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,
});