ember-uservoice

1.1.0 • Public • Published

Ember User Voice

Build

About

Uservoice widget instantiation support. Full widget configuration from your environment file. Customer data is set in the initializer.

Install

npm install ember-uservoice --save-dev

Usage

How to use Uservoice widget you can find on their website.

You don't need to include script tags in your index.html file. Widget will be initialized after you will define the configuration.

Configuration

In your environment file, in the ENV object, create userVoice key and set options that you want to change:

var ENV = {
  ...
  vetoza: {
    userVoice: {
      id: '<user voice widget id>',
      set: {
        accent_color: '#00658b',
        trigger_color: 'white',
        trigger_background_color: '#00658b'
      },
      addTrigger: {mode: 'contact', trigger_position: 'bottom-right'},
      autoprompt: {}
    },
  }
  ...
}

User voice options: id, set, addTrigger, autoprompt should be configured for your needs according to User Voice website.

Initializer

ember generate uservoice-initializer uservoice

File app/initializers/uservoice.js will be created.

app
└── initializers
    └── uservoice.js

Configure it to your needs, when you want to pre-set logged in user information. Do not forget to include after key in initializer to get correct loading sequence for initializers.

import EmberUserVoice from 'ember-uservoice';
 
export default {
  name: 'ember-uservoice',
 
  initialize: function (/*container, application*/) {
    //Uncomment when you will be ready to setup user information
    //EmberUserVoice.getUserVoice().push(['identify', {
    //  email: '<customer email>',
    //  name: '<customer name>',
    //  created_at: <customer creted date>,
    //  id: <customer id>,
    //  type: '<customer type>'
    //}]);
  }
};

Authors

Versioning

This library follows Semantic Versioning

Legal

@vetoza

Licensed under the MIT license

Readme

Keywords

Package Sidebar

Install

npm i ember-uservoice

Weekly Downloads

5

Version

1.1.0

License

MIT

Last publish

Collaborators

  • vetoza