WWW::Deduce::Ingest - an interface to Deduce Ingestion
use WWW:Deduce::Ingest; my $d = WWW::Deduce::Ingest->new( 'my site id', 'my secret api key' ); # output html widget print $d->html('email@example.com'); # send an event my $err = $d->event( 'email@example.com', '192.0.2.3', 'eventname', { ... }, $opts ); print STDERR "uh oh! $err\n" if $err;
Create a new object. You need to pass in the site id and api key that were assigned to you by Deduce.
Generate HTML to place on your web page.
email
The user's email address. It will be processed and hashed, not used directly.
When something interesting happens on your site, tell Deduce.
client_ip
the user's IP address in dotted quad format (IPv4), or coloned octopus (IPv6). can often be found in $ENV{REMOTE_ADDR}.
eventtype
the event type. Consult with Deduce support to determine the event types.
additional
a hashref of event data to send. Consult with Deduce support to determine data to send.
if you pass in 'email_prev' or 'cc' fields, they will be automatically processed and hashed, not send directly.
returns
if there is an error, the error message will be returned. on success, nothing.
You can send several related events, by sending an array of event data.
evts
an array of event data (hashrefs).
the events must contain valid email, ip, and event fields.
any email, email_prev, and cc fields will automatically be processed and hashed.
There are no known bugs in the module.
http://www.deduce.com/
This software may be copied and distributed under the terms found in the Perl "Artistic License".
A copy of the "Artistic License" may be found in the standard Perl distribution.
To install WWW::Deduce::Ingest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Deduce::Ingest
CPAN shell
perl -MCPAN -e shell install WWW::Deduce::Ingest
For more information on module installation, please visit the detailed CPAN module installation guide.