Socket
Socket
Sign inDemoInstall

@knotel/intel

Package Overview
Dependencies
4
Maintainers
19
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @knotel/intel

React components for standardizing analytics implementation across Knotel apps


Version published
Maintainers
19
Install size
3.78 MB
Created

Readme

Source

@knotel/intel

React components for standardizing analytics implementation across Knotel apps

Install

yarn add @knotel/intel

Initializing Intel

In order to enable Heap Analytics in your app, you need to include the <IntelProvider /> component somewhere in your project, ideally in the root component. You must include both the environment you're running (local, test, stage, or prod), as well as your appName. These props are used to correctly place the events you're sending in Heap.

import React, { Component } from 'react'

import { IntelProvider } from '@knotel/intel'

class App extends Component {
  render () {
    return (
      <div>
        <IntelProvider environmnet="local" appName="atlas" />
        <MainPage />
      </div>
    )
  }
}

There is also a function getIntelContent that can be used to just get the script content, and just like IntelProvider, it accepts two arguments, environment and appName. This function can be used when an app uses something other than react-helmet to add tags to its head (for example, next.js uses its own Head component).

License

MIT © nicholasalanbrown 0

FAQs

Last updated on 26 Sep 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc