Skip to content

Commit

Permalink
Merge pull request #20 from unicef-polymer/poly2-apd
Browse files Browse the repository at this point in the history
Adds apd specific tracking
  • Loading branch information
drzackyll authored Apr 18, 2019
2 parents de54549 + d6fa885 commit 6b10285
Showing 1 changed file with 137 additions and 5 deletions.
142 changes: 137 additions & 5 deletions etools-piwik-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,145 @@
]);
break;

default:
_paq.push([
case 'ADD NEW TRIP':
_paq.push([
'trackEvent',
'add new trip',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'SAVE':
_paq.push([
'trackEvent',
'save',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'SAVE & SUBMIT':
_paq.push([
'trackEvent',
'save and submit',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'CANCEL':
_paq.push([
'trackEvent',
'cancel',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'PRINT':
_paq.push([
'trackEvent',
'print',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'DUPLICATE TRIP':
_paq.push([
'trackEvent',
'in-app navigation',
document.location.pathname,
'tap'
'duplicate trip',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD DRIVER':
_paq.push([
'trackEvent',
'add driver',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD NEW ENGAGEMENT':
_paq.push([
'trackEvent',
'add new engagement',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD NEW STAFF SPOT CHECKS':
_paq.push([
'trackEvent',
'add new staff spot checks',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD NEW VENDOR':
_paq.push([
'trackEvent',
'add new vendor',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD NEW VISIT':
_paq.push([
'trackEvent',
'add new visit',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

case 'ADD ACTION POINT':
_paq.push([
'trackEvent',
'add action point',
this.page,
this.user.groups.map(function(g) {
return g.name;
})
]);
break;

default:
_paq.push([
'trackEvent',
'in-app navigation',
document.location.pathname,
'tap',
]);
}
}
}
Expand Down

0 comments on commit 6b10285

Please sign in to comment.