1.0.0 • Published 6 years ago

ember-cli-mautic v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

ember-cli-mautic

📊 Ember CLI addon for easy Mautic monitoring

Installation

ember install ember-cli-mautic

Add your Mautic domain to mautic config object for the library to be loaded.

// config/environment.js

ENV['mautic'] = {
  WEBSITE_URL = 'your_mautic_domain'
}

Usage

The addon exposes a service which can be injected into your components, routes, etc.

import { Component } from '@ember/component';
import { inject as service } from '@ember/service';

export default Component.extend({
  mautic: service()
});

Tracking page views

The addon automatically tracks page views on the application didTransition event.

To disable this functionality, you can add the defaultPageTrack option to your mautic config option.

// config/environment.js

ENV['mautic'] = {
  WEBSITE_URL = 'your_mautic_domain',
  defaultPageTrack: false
}

To call manually, use the trackPageView method on the service.

get(this, 'mautic').trackPageView()

Contributing

Installation

  • git clone <repository-url>
  • cd ember-cli-mautic
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.