1.2.0 • Published 9 years ago
ng-pendo v1.2.0
ng-pendo v1.2.0
Installation
$ npm i --save ng-pendoUsage
Import pendolytics module:
import ngPendo from 'ng-pendo';or
var ngPendo = require('ng-pendo');Provide your api key:
window.pendo_options = {
apiKey: 'replace this with your api key',
usePendoAgentAPI: true
};Include pendolytics in your AngularJS modules:
angular.module('your-app', [...,'pendolytics',...]);or
angular.module('your-app', [...,ngPendo,...]);When you have access to the visitor information use it to identify the visitor:
getVisitorInformationFromSomewhere().then(function (visitor) {
$pendolytics.identify({
visitor: {
id: visitor.id,
role: visitor.role,
email: visitor.email
},
account: {
id: visitor.accountId
}
});
});