Name: meteor-customer-io
Owner: meteorhacks
Description: Customer.io Integration for Meteor
Created: 2014-08-30 00:36:06.0
Updated: 2017-06-09 12:03:15.0
Pushed: 2014-10-08 08:04:45.0
Homepage: null
Size: 165
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is an isopack!
(Which means, both client and server has the same API)
// for meteor 0.9
meteor add meteorhacks:customer.io
// for < meteor 0.9
mrt add customer.io
// initialization
var siteId = 'site_id';
var token = 'the_token'; // only on the server
var cio = CustomerIo.init(siteId, token);
// identifing
var userId = 'user_id';
var email = 'user@email.com';
var properties = {name: "My Name"};
cio.identify(userId, email, properties, function(err, res, body) {
// callback is only available on the server
});
// track
var userId = 'user_id';
var event = 'the_event';
var properties = {name: "My Name"};
cio.track(userId, event, properties, function(err, res, body) {
// callback is only available on the server
});