forked from brewster/dashiki
-
Notifications
You must be signed in to change notification settings - Fork 4
Sendgrid
Ric Lister edited this page May 24, 2013
·
1 revision
Sendgrid source shows time-series data from sendgrid api.
-
type
:sendgrid
-
proxy
: will probably need to be settrue
to get around same-origin policy -
api_user
: your username -
api_key
: your login password -
target
: name of statistic to show
Sendgrid data resolution is daily, so there is not much point in looking at shorter periods.
var dash = Dash.stats()
.config({
type: 'sendgrid',
proxy: true,
api_user: 'username',
api_key: 'password'
});
[
'requests',
'delivered',
'blocked',
'bounces',
'repeat_bounces',
'spamreports',
'repeat_spamreports',
'unsubscribes',
'repeat_unsubscribes',
'invalid_email',
'spam_drop',
'opens',
'unique_opens',
'clicks',
'unique_clicks'
].forEach(function(metric) {
dash.add({
title: Dash.capitalize(metric),
target: metric
})
});
There appears to be an issue with retrieving data for periods > 1 day that needs to be investigated. In general, dates are problematic since Sendgrid treats all dates as CT and errors out if your timezone is ahead of CT.
It is probably possible to create .find()
method to list categories using /stats.get.json?list=true
. This should be implemented.