1var analy = { 2 initial: function() { 3 this.google(); 4 var e = DUI.Cookie.get("country") || ""; 5 "cn" == e.toLowerCase() && this.ad_track() 6 }, 7 google: function() { ! 8 function(e, t, a, n, r, o, i) { 9 e.GoogleAnalyticsObject = r, 10 e[r] = e[r] || 11 function() { (e[r].q = e[r].q || []).push(arguments) 12 }, 13 e[r].l = 1 * new Date, 14 o = t.createElement(a), 15 i = t.getElementsByTagName(a)[0], 16 o.async = 1, 17 o.src = n, 18 i.parentNode.insertBefore(o, i) 19 } (window, document, "script", "//www.google-analytics.com/analytics.js", "ga"), 20 ga("create", "UA-43055594-1", "zmifi.com"), 21 ga("require", "displayfeatures"); 22 var e = DUI.Config.region || ""; 23 "cn" == e.toLowerCase() && ga("set", "allowAdFeatures", !1), 24 ga("send", "pageview") 25 }, 26 ad_track: function() { 27 var e = window._mvq || []; 28 window._mvq = e, 29 e.push(["$setAccount", "m-28941-0"]), 30 e.push(["$logConversion"]), 31 function() { 32 var e = document.createElement("script"); 33 e.type = "text/javascript", 34 e.async = !0, 35 e.src = "https:" == document.location.protocol ? "https://static-ssl.mediav.com/mvl.js": "http://static.mediav.com/mvl.js"; 36 var t = document.getElementsByTagName("script")[0]; 37 t.parentNode.insertBefore(e, t) 38 } () 39 }, 40 common_ga_data: [{ 41 selector: ".site-nav-menu a", 42 category: "nav_", 43 categorySelector: "", 44 getCategory: "category", 45 eventAction: "click", 46 getAction: "page", 47 eventLabel: "" 48 }, 49 { 50 selector: "#siteHeaderNavbar .navbar-nav a", 51 category: "nav_right", 52 getCategory: "", 53 eventAction: "click", 54 getAction: "nav_right", 55 eventLabel: "" 56 }, 57 { 58 selector: ".site-footer a", 59 category: "footer_", 60 getCategory: "footer_category", 61 eventAction: "click", 62 getAction: "footer_page", 63 eventLabel: "" 64 }], 65 page_ga_data: [{ 66 selector: ".container-fluid a", 67 category: "homeBanner", 68 eventAction: "click", 69 eventLabel: "" 70 }], 71 unBubbleEvents: ["mouseenter"], 72 add_common_ga: function() { 73 for (var e = this.common_ga_data, 74 t = 0, 75 a = e.length; t < a; t++) ! 76 function(t) { 77 var a = e[t], 78 n = a.selector, 79 r = a.category, 80 o = a.eventAction, 81 i = a.getCategory, 82 c = a.getAction; 83 $(n).on(o, 84 function(e) { 85 var t = $(this), 86 a = r + analyHelper.getAction(t, i), 87 n = analyHelper.getAction(t, c); 88 $(this)[0].innerText, 89 ga("send", "event", a, o, n) 90 }) 91 } (t) 92 }, 93 add_page_ga: function() { 94 for (var e = this.page_ga_data, 95 t = 0, 96 a = e.length; t < a; t++) ! 97 function(t) { 98 var a = e[t], 99 n = a.selector, 100 r = a.category, 101 o = a.eventAction; 102 $(n).on(o, 103 function(e) { 104 var t = $(this), 105 a = analyHelper.getAction(t, "footer_page"); 106 ga("send", "event", r, o, a) 107 }) 108 } (t) 109 }, 110 init_ga: function() { 111 var e = $(".ga-data"), 112 t = [], 113 a = this.unBubbleEvents; 114 if (0 != e.length) { 115 e.each(function() { 116 var e = $(this), 117 n = e.data("ga-action") ? e.data("ga-action") : "click", 118 r = e.data("ga-category") ? e.data("ga-category") : "", 119 o = e.data("ga-label") ? e.data("ga-label") : ""; 120 if (n && r && o) for (var i = n.split(","), c = 0; c < i.length; c++) { 121 if (a.indexOf(i[c]) > -1) return void analyHelper.unBubble(i[c], e, r, o); 122 t.push(i[c]) 123 } 124 });
125 var n = analyHelper.unique(t); 126 analyHelper.bubbleGa(n) 127 } 128 } 129}, 130analyHelper = { 131 unBubble: function(e, t, a, n) { 132 t.on(e, 133 function() { 134 ga("send", "event", a, e, n) 135 }) 136 }, 137 bubbleGa: function(e) { 138 if (e.length > 0) for (var t = 0; t < e.length; t++) analyHelper.sendGa(e[t]) 139 }, 140 sendGa: function(e) { 141 var t = document.querySelector("body"); 142 t.addEventListener(e, 143 function(t) { 144 for (var a = t || window.event, 145 n = a.target || a.srcElement; n && n.hasAttribute && !n.hasAttribute("data-ga-action") && "BODY" != n.tagName;) n = n.parentNode; 146 if (n && n.hasAttribute && n.hasAttribute("data-ga-action")) { 147 var r = n.getAttribute("data-ga-action") ? n.getAttribute("data-ga-action") : "click", 148 o = n.getAttribute("data-ga-category") ? n.getAttribute("data-ga-category") : "", 149 i = n.getAttribute("data-ga-label") ? n.getAttribute("data-ga-label") : ""; 150 window.ga && r.indexOf(t.type) > -1 && ga("send", "event", o, e, i) 151 } 152 }) 153 }, 154 getAction: function(e, t) { 155 var a = /[^\/]*$/, 156 n = "", 157 r = ""; 158 switch (t) { 159 case "category": 160 r = e.parents(".category-item").children("a").attr("href"), 161 n = r.indexOf("javascript") == -1 ? a.exec(r)[0] : "community"; 162 break; 163 case "footer_category": 164 r = e.parents(".link-list").find("a").first().attr("href"), 165 r = this.isOuterLink(r), 166 n = a.exec(r)[0]; 167 break; 168 case "footer_page": 169 r = (e.attr("href") || "").split("?")[0], 170 r = this.isOuterLink(r), 171 n = a.exec(r)[0] 172 } 173 return n 174 }, 175 unique: function(e) { 176 for (var t = [], a = 0, n = e.length; a < n; a++) { 177 var r = e[a]; 178 t.indexOf(r) === -1 && t.push(r) 179 } 180 return t 181 } 182}; 183$(function() { 184 analy.initial(), 185 analy.add_page_ga(), 186 analy.init_ga() 187});
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.