Add device type detect and stats calculation for open/click rate by device type and country
This commit is contained in:
parent
b6497b0e86
commit
1ba3bce6eb
10 changed files with 176 additions and 15 deletions
|
@ -18,8 +18,7 @@ router.get('/:campaign/:list/:subscription', (req, res) => {
|
|||
'Content-Type': 'image/gif',
|
||||
'Content-Length': trackImg.length
|
||||
});
|
||||
|
||||
links.countOpen(req.ip, req.params.campaign, req.params.list, req.params.subscription, (err, opened) => {
|
||||
links.countOpen(req.ip, req.headers['user-agent'], req.params.campaign, req.params.list, req.params.subscription, (err, opened) => {
|
||||
if (err) {
|
||||
log.error('Redirect', err.stack || err);
|
||||
}
|
||||
|
@ -53,7 +52,7 @@ router.get('/:campaign/:list/:subscription/:link', (req, res) => {
|
|||
log.error('Redirect', 'Unresolved URL: <%s>', req.url);
|
||||
return notFound();
|
||||
}
|
||||
links.countClick(req.ip, req.params.campaign, req.params.list, req.params.subscription, linkId, (err, status) => {
|
||||
links.countClick(req.ip, req.headers['user-agent'], req.params.campaign, req.params.list, req.params.subscription, linkId, (err, status) => {
|
||||
if (err) {
|
||||
log.error('Redirect', err.stack || err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue