1function pgmixpanel(optionArr) { 2 this.identifyData = { 3 fname: '', 4 email: '', 5 created: '', 6 request_code: '' 7 } 8 9 var _self = this; 10 11 this.Init = function(options){ 12 _self.identifyData = jQuery.extend(_self.identifyData, options); 13 } 14 15 this.mixpanelIdentify = function() { 16 mixpanel.people.set({ 17 "$first_name": _self.identifyData.fname, 18 "$email": _self.identifyData.email, 19 '$created': _self.identifyData.created, 20 "request_code": _self.identifyData.request_code, 21 }); 22 23 mixpanel.identify(_self.identifyData.email); 24 } 25 26 this.mixpanelTrack = function(event) { 27 _self.mixpanelIdentify(); 28 if(event == 'Free trial') { 29 mixpanel.people.set({ 30 "Free trial":new Date() 31 }); 32 } 33 mixpanel.people.increment(event); 34 mixpanel.track(event); 35 } 36 37 this.demoTrack = function() { 38 jQuery('.demo-request-menu').find('a').bind( "click", function() { 39 var id = jQuery(this).attr('id'); 40 var event; 41 42 id = id.replace(/\d/g, ''); 43 44 switch(id) { 45 case 'get_demo_user_link': 46 event = 'Free trial'; 47 break; 48 case 'get_demo_admin_link': 49 event = 'Free trial'; 50 break; 51 case 'get_trial_link': 52 event = 'Free trial'; 53 break; 54 case 'get_app_ios_link': 55 event = 'iOS demo'; 56 break; 57 case 'get_app_android_link': 58 event = 'Android demo'; 59 break; 60 case 'get_free_link': 61 event = 'free open source' 62 break 63 default: 64 event = 'Marketplace'; 65 break; 66 } 67 68 _self.mixpanelTrack(event); 69 }); 70 } 71 72 _self.Init(optionArr); 73}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.