Socket
Socket
Sign inDemoInstall

@kano/kbc-telemetry

Package Overview
Dependencies
Maintainers
12
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kano/kbc-telemetry

Telemetry module for boilerplate apps, using react-tracking


Version published
Weekly downloads
37
increased by146.67%
Maintainers
12
Weekly downloads
 
Created
Source

kbc-telemetry

Telemetry module for boilerplate apps, using react-tracking

Usage

import * as Telemetry from '@kano/kbc-telemetry';

const Tracking = Telemetry.TelemetryProvider;

// Wrap your app in <Tracking> and pass config info

const config = {
    app: app.name,
    appVersion: app.version
    url: app.url,
    env: app.env
    interval: 10000 // How frequently you want the telemetry data sent to your database
}

render() {
    return (
        <Tracking config={config}>
            <App />
        </Tracking>
    );
}

Tracking data can be sent as decorators in container/component files: See https://github.com/nytimes/react-tracking README

import React, { Component } from 'react';
import * as Telemetry from '@kano/kbc-telemetry';

@Telemetry.track({ event: 'name-of-your-event' })
class MyComponent extends Component {

    @Telemetry.track({ event: 'I-did-something', action: 'click' })
    handleSomething() {
        //I run something
    }

    render() {
        return <div></div>;
    }
}

FAQs

Package last updated on 18 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc