ember-cli-mautic

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i ember-cli-mautic

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.88 kB

Total Files

9

Last publish

Collaborators

  • moltinbot