@deduce-com/deduce-ingest
Send events to Deduce Service
Last updated 6 months ago by deduce-com .
MIT · Original npm · Tarball · package.json
$ cnpm install @deduce-com/deduce-ingest 
SYNC missed versions from official npm registry.

node-deduce-ingest

Deduce's data ingestion.

Installation

Using npm:

npm install node-deduce-ingest

Or get the source:

github.com/deduce-com/node-deduce-ingest

Usage

Configuration

Deduce Ingest requires a Site ID and apikey, provided by Deduce. If you have not been given one, please contact Deduce for more information.

Node module

    import Ingest from 'node-deduce-ingest';
    var dd = new Ingest('my site id', 'my secret key');

while doing development, you may enable testmode and Deduce will discard the data after validating your requset.

    var dd = new Ingest('my site id', 'my secret key', true /* enable testmode */);

Sending Data to Deduce

Use the "html" function to get html code to include in a web page.

    var scriptTags = dd.html("user@example.com");

Sending Events to Deduce

    function callback(res) {
        if ('' !== res) {
            console.log('result: ' + res);
        }
    }

    dd.event(user.email, ip, 'account-create', callback,
        {additional: {name: user.name, phone: user.phone},
         testmode: true});

Depending on the event type, additional data be send by passing an additional hash. You should consult with Deduce support for specific parameters and event types.

Best Practices

  • Only pass information that you have already verified to be valid.

  • Work closely with your Deduce support representative.

Current Tags

  • 0.1.0                                ...           latest (6 months ago)

1 Versions

  • 0.1.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |