1/** 2 * Identify browser on site if they are logged in. 3 * 4 * Object possibly containing user/commenter email address: 5 * @typedef {Object} klUser 6 * @property {string} currect_user_email - Email of logged in user 7 * @property {string} commenter_email - Email of logged in commenter 8 * 9 */ 10 11 12function klIdentifyBrowser(klUser) { 13 var klaviyo = window.klaviyo || []; 14 if (klUser.current_user_email) { 15 klaviyo.push(["identify", { 16 "$email": klUser.current_user_email 17 }]); 18 } else { 19 // See if current user is a commenter 20 if (klUser.commenter_email) { 21 klaviyo.push(["identify", { 22 "$email": klUser.commenter_email 23 }]); 24 } 25 } 26} 27 28 29window.addEventListener("load", function() { 30 !function(){if(!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(n,i){return"push"===i?function(){var n;(n=window._klOnsite).push.apply(n,arguments)}:function(){for(var n=arguments.length,o=new Array(n),w=0;w<n;w++)o[w]=arguments[w];var t="function"==typeof o[o.length-1]?o.pop():void 0,e=new Promise((function(n){window._klOnsite.push([i].concat(o,[function(i){t&&t(i),n(i)}]))}));return e}}})}catch(n){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var n;(n=window._klOnsite).push.apply(n,arguments)}}}}(); 31 klIdentifyBrowser(klUser); 32});
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.