Node JS Totango activities, modules and attributes tracker
npm install totango-tracker
$ npm install totango-tracker
`Usage
$3
`
$ npm install totango-tracker
`$3
`js
//replace XXXX with your unique Totango service id, set the relevant site and add your SDR security token
const tracker = require('totango-tracker')('SP-XXXX-01','{us}/{eu}', 'sdr-token');
`
$3
`js
tracker.trackActivity(accountId, userId, activity, module, function(err){
if (err) {
// handle the error
}
else {
// Success
}
});// Example
tracker.trackActivity('YYYYY', 'john@anonymous.com', 'some activity', 'some module', function(err){
...
});
`$3
`js
tracker.setAccountAttributes(accountId, {
'Attribute1' : 'value1',
'Attribute2' : 'value2',
}, function(err) {
if (err) {
// handle the error
}
else {
// Success
}
}
);
`$3
`js
tracker.setUserAttributes(accountId, userId, {
'Attribute1' : 'value1',
'Attribute2' : 'value2',
}, function(err) {
if (err) {
// handle the error
}
else {
// Success
}
}
);
``https://www.totango.com/terms-of-use