0.1.1 • Published 5 years ago

@wisersolutions/heap-analytics v0.1.1

Weekly downloads
90
License
MIT
Repository
github
Last release
5 years ago

heap-analytics

Utils for integrating Heap into web applications.

Use

To use Heap in a React application, simply use the useHeap hook in an app root with access to both the assigned Heap ID and to user information.

import { useHeap } from '@wisersolutions/heap-analytics'

export const App = ({ heapId, username, ...props }) => {
  useHeap(heapId, username)
  // … (render the app)
}

To integrate Heap into an app that's not using React, import just the loader code.

import '@wisersolutions/heap-analytics/lib/heap'

Development

Install

Install dependencies using:

npm install

Develop

After you modify sources, run the following (or set up your IDE to do it for you):

  • format the code using npm run format
  • lint it using npm run lint

and fix the errors, if there are any.

Publish

Publishing is done in two steps:

  1. Create a new version tag and push it to the repository:
    npm version <patch|minor|major>
    git push --follow-tags
  2. Build and publish the new version as a npm package:
    npm publish --access public
0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago