Skip to content
telemetry / 1.0.37

telemetry 1.0.37

Install from the command line:
Learn more about npm packages
$ npm install @harness/telemetry@1.0.37
Install via package.json:
"@harness/telemetry": "1.0.37"

About this version

Harness Telemetry

This package provides an abstraction for front end telemetry frameworks. Currently, this abstracts the Segment package. This allows consumers to avoid implementing and duplicating their own analytics methods and use a common package. In the future, if Segment is not used in favour of another analytics framework, it will be easy to change the contents of this abstraction rather than asking all consumers to change their code.

Documentation

Design

Local Development

  1. Install the dependencies
$ yarn
  1. Add the package to your repo
yarn add file:./../harness-telemetry // The path to your repo
  1. Follow the steps in "Using this package"

Using this package

  1. Install the package in your repository
$ yarn add @harness/telemetry
  1. Initialize the Telemetry package at the entry point of your app and save it in a local file.
// your_app/src/Telemetry.ts
import Telemetry from '@harness/Telemetry'

const telemetry = new Telemetry(YOUR_WRITE_KEY)

export default telemetry;
  1. (OPTIONAL) Set the accountId.
// your_app/src/Telemetry.ts
import telemetry from './Telemetry'

telemetry.accountId = THE_ACCOUNT_ID
  1. Use the telemetry instance to call analytics methods.
import telemetry from './Telemetry'

telemetry.track("signup", { email })

Contributing

  1. Submit a PR and bump the version number in package.json
  2. Run the jenkins job

The jenkins job will publish a new version to our npm registry.

Details


Assets

  • telemetry-1.0.37-npm.tgz

Download activity

  • Total downloads 12,304
  • Last 30 days 258
  • Last week 75
  • Today 6