install instructions:
npm install threads.io
In your project: var threadsio = require('threads.io')('YOUR_THREADS.IO_API_KEY');
Usage:
###identify(params, callback)###
var params = {
userid: '1234567890', //required
traits: {
email: '[email protected]',
fullname: 'Mister Smith'
}
};
threadsio.identify(params, function (error, result) {
if (result === true) {
// Everything is great...
} else {
// Everything is not great...
console.log(error);
}
});
###track(params, callback)###
var params = {
userid: '1234567890', //required
traits: {
email: '[email protected]',
fullname: 'Mister Smith'
}
};
threadsio.identify(params, function (error, result) {
if (result === true) {
// Everything is great...
} else {
// Everything is not great...
console.log(error);
}
});
###page(params, callback)###
var params = {
userid: '1234567890', //required
traits: {
email: '[email protected]',
fullname: 'Mister Smith'
}
};
threadsio.identify(params, function (error, result) {
if (result === true) {
// Everything is great...
} else {
// Everything is not great...
console.log(error);
}
});
###remove(params, callback)###
var params = {
userid: '1234567890', //required
traits: {
email: '[email protected]',
fullname: 'Mister Smith'
}
};
threadsio.identify(params, function (error, result) {
if (result === true) {
// Everything is great...
} else {
// Everything is not great...
console.log(error);
}
});