ember-heap-analytics

0.0.2 • Public • Published

ember-heap-analytics

ember-heap-analytics is an easy way to add Heap analytics to your ember-cli project without having to rely on the Heap dashboard.

If you have any questions, come 👋 hello in #e-heap on the Ember Community Slack.

Features

Installation

  • npm install --save ember-heap-analytics
  • ember server

Usage

export default Ember.Component.extend({

  heap: Ember.inject.service(),

  myCustomEventMethod: function() {

    var heap = this.get('heap');

    // track :: Send additional events to Heap.
    heap.track('Purchase', {dollars: 50, item: 'Furby'});

    // identify :: Attach a unique identity to a user.
    heap.identify('alice123');

    // addUserProperties :: Attach custom properties to user profiles.
    heap.addUserProperties({'Name': 'Alice Smith','Profession': 'Data Scientist'});

    // addEventProperties :: Specify a set of global key-value pairs to get attached to all of a user's subsequent events.
    heap.addEventProperties({'Logged In': 'true', 'Payment Plan': 'Free'});

    // removeEventProperty :: Stops a single event property from getting attached to all subsequent events.
    heap.removeEventProperty('Logged In');

    // clearEventProperties :: Removes all stored event properties.
    heap.clearEventProperties();

  }
})

For more information, check out the official documentation

Package Sidebar

Install

npm i ember-heap-analytics

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.84 kB

Total Files

8

Last publish

Collaborators

  • shibulijack