NPS Widget - 1.0.0

Project to collect NPS.

Include inside body the NPS div tag.

Include script below to create the widget.

Configuration

store
{ String } | Default: 'Dafiti' | Options: 'Tricae', 'Kanui'
locale
{ String } | Default: 'pt-BR' | Options: 'es-AR', 'es-CO', 'es-CL', 'pt-BR'
question
{ Object } | Default: {} | If not informed the select will not appears.
question.options
{ Array } | Select options
question.comment
{ String } | Option that shows 'leave a comment' textarea
labels.description
{ String } | Default: 'Qual a probabilidade de você indicar a {{store}} para um amigo?' | The NPS description

Example

var config = {
  store: 'Dafiti',
  locale: 'es-AR',
  question: {
    options: [
      'Facilidad para encontrar productos',
      'Variedad de productos/marcas',
      'Información sobre productos',
      'Disponibilidad de tallas',
      'Precios/Promociones',
      'Medios de Pago',
      'Plazo de entrega',
      'Costos de envío',
      'Otros'
    ],
    comment: 'Otros'
  }
}
nps('init', config);
          

Console edit

Change settings to see how it looks

Result