1.2.3 • Published 3 years ago
@eduzz/nps v1.2.3
Eduzz NPS
Nps EDUZZ NPS
How to use
In Browser
(function (d, l, c) {
var s = d.createElement('script');
s.async = true;
s.src = l;
s.onload = c;
d.body.append(s);
})(document, 'https://unpkg.com/@eduzz/nps@^<version>/build/widget.js', function () {
var nps = window.Nps({
//you can set the config initial
key_fields: { email: 'theflash@eduzz.com' }
tag: { id: '123', email: 'theflash@eduzz.com', type: 'F' },
endpoint: '<endpoint api>' //if ignored, set to production
});
// Or later
var nps = window.Nps();
nps.setConfig(
{ email: 'theflash@eduzz.com' },
{ id: '123', email: 'theflash@eduzz.com', type: 'F' },
'modal',
'<endpoint api>' // if ignored, set to production
);
Via npm
// Nps.ts <~ create in your application
import Nps from '@eduzz/nps';
export async function setConfig(yourConfig: IYourInterface) {
const promiseNps = Nps();
const nps = await promiseNps;
if (!nps) return;
nps.setConfig(yourConfig);
}
1.2.3
3 years ago
1.2.2
3 years ago
1.2.0
4 years ago
1.2.1
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.9
4 years ago
1.0.10
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.2
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.1.0-beta.0
5 years ago