- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
$(document).on('initiate_eandecustomeventanalytics', function(e,d){
//usage: $(document).trigger('initiate_eandecustomeventanalytics', {version: 1})
//Calling this first to bring the handlers in. version is to accommodate changing the API surface at a later date.
if(d.version == 1){
$(document).on('eande_requestform', function(e,d){
//usage: $(document).trigger('eande_requestform', {vertical: 'business'})
//usage: $(document).trigger('eande_requestform', {vertical: 'k12'})
var vert = (d && d.vertical) || 'business';
var formview = {'business':'42','k12':'43','publicsector':'49','highered':'50'}[vert] || '42';
s.clearVars();
s.addEvent('event'+formview);
s.tl();
});
$(document).on('eande_formsubmit', function(e,d){
//usage: $(document).trigger('eande_formsubmit', {vertical: 'business'})
//usage: $(document).trigger('eande_formsubmit', {vertical: 'k12'})
var vert = (d && d.vertical) || 'business';
var formsubmit = {'business':'52','k12':'53','publicsector':'59','highered':'60'}[vert] || '52';
s.clearVars();
s.addEvent('event'+formsubmit);
s.tl();
});
}
})