PageSourceSearch

https://www.senheng.com.my/wp-content/plugins/woocommerce-pixel-ma…/pixel-triple-whale.e35f738b.chunk.min.js

js senheng.com.my collected 2026-09-24 09:29:02 UTC 9,133 bytes, 3 lines download raw bytes

1/*! Copyright 2025 SweetCode. All rights reserved. */
2(self.webpackChunkPixel_Manager_for_WooCommerce=self.webpackChunkPixel_Manager_for_WooCommerce||[]).push([[674],{7817(){!function(e){const t=["email","phone","firstName","lastName"],a=["zip","city","countryCode","provinceCode"];const r=new class{adapt(e,t,a){const r=`adapt${this.toPascalCase(t)}`;return"function"==typeof this[r]?this[r](e,a):null}toPascalCase(e){return"string"!=typeof e?"":e.replace(/(^|_)(\w)/g,(e,t,a)=>a.toUpperCase())}emptyIdentity(){return{email:"",phone:"",firstName:"",lastName:"",address:{zip:"",city:"",countryCode:"",provinceCode:""}}}mergeIdentity(e,r){return r&&"object"==typeof r?(t.forEach(t=>{!e[t]&&r[t]&&(e[t]=String(r[t]).trim())}),r.address&&"object"==typeof r.address&&a.forEach(t=>{!e.address[t]&&r.address[t]&&(e.address[t]=String(r.address[t]).trim())}),e):e}getIdentity(t){const a=pmwDataLayer?.user,r=this.mergeIdentity(this.emptyIdentity(),{email:a?.email?.raw,phone:a?.phone?.raw,firstName:a?.first_name?.raw,lastName:a?.last_name?.raw,address:{zip:a?.postcode?.raw,city:a?.city?.raw,countryCode:a?.country?.raw,provinceCode:a?.state?.raw}});if(this.mergeIdentity(r,t),"function"==typeof e.tripleWhaleGetIdentity&&this.mergeIdentity(r,e.tripleWhaleGetIdentity()),"function"==typeof e.platform?.getCheckoutContact)try{this.mergeIdentity(r,e.platform.getCheckoutContact())}catch(t){e.console.error(t)}return r}hasIdentity(e){return!(!e?.email&&!e?.phone)}toLineItem(e){const t=e.parent_id||e.id,a=e.is_variation?e.id:e.variation_id||e.id;return{i:t?.toString(),q:e.quantity||1,v:a?.toString()}}getLineItems(e){return Object.entries(e||{}).map(([t,a])=>this.toLineItem(a&&void 0===a.id&&!Array.isArray(e)?{...a,id:t}:a))}getFunnelPayload(t,a,r){return{eventId:e.getRandomEventId(),email:t.email,phone:t.phone,firstName:t.firstName,lastName:t.lastName,lineItems:a,address:{...t.address},...r||{}}}contactEvent(e){const t={};return e.email&&(t.email=e.email),e.phone&&(t.phone=e.phone),{event_name:"Contact",event_data:t}}adaptAddToCart(e,t){const a=e?.product;if(!a)return null;const r=a.parent_id||a.id,i=a.is_variation?a.id:a.variation_id||a.id,n={item:r?.toString(),q:a.quantity||1,v:i?.toString()};return a.is_variation&&(n.variation_id=a.id?.toString()),{event_name:"AddToCart",event_data:n}}adaptAddContactInfo(t,a){const r=this.getIdentity(t);return this.hasIdentity(r)?("function"==typeof e.tripleWhaleSetIdentity&&e.tripleWhaleSetIdentity(r),{events:[this.contactEvent(r),{event_name:"contactSubmitted",event_data:this.getFunnelPayload(r,this.getLineItems(pmwDataLayer?.cart))}]}):null}adaptBeginCheckout(e,t){const a=this.getIdentity();return this.hasIdentity(a)?{event_name:"checkoutStarted",event_data:this.getFunnelPayload(a,this.getLineItems(pmwDataLayer?.cart))}:null}adaptAddShippingInfo(e,t){const a=this.getIdentity();if(!this.hasIdentity(a))return null;const r=this.getLineItems(pmwDataLayer?.cart);return{events:[{event_name:"addressSubmitted",event_data:this.getFunnelPayload(a,r)},{event_name:"shippingSubmitted",event_data:this.getFunnelPayload(a,r)}]}}adaptAddPaymentInfo(e,t){const a=this.getIdentity();return this.hasIdentity(a)?{event_name:"paymentSubmitted",event_data:this.getFunnelPayload(a,this.getLineItems(pmwDataLayer?.cart))}:null}adaptLogin(e,t){const a=this.getIdentity();return this.hasIdentity(a)?this.contactEvent(a):null}adaptAccountCreated(e,t){return this.adaptLogin(e,t)}adaptPurchase(e,t){const a=pmwDataLayer?.order;if(!a)return null;const r=this.getIdentity({email:a.billing_email,phone:a.billing_phone}),i=a.id?.toString(),n=this.getLineItems(a.items),o={event_name:"Purchase",event_data:this.getFunnelPayload(r,n,{eventId:"pmw_"+i,orderId:i,order_id:i})},s=Array.isArray(a.subscriptions)?a.subscriptions:[];return s.length?{events:[o,...s.map(e=>({event_name:"NewSubscription",event_data:this.getFunnelPayload(r,n,{orderId:i,subscriptionId:e?.toString()})}))]}:o}};e.registerAdapter("triple_whale",r,{supportsS2S:!1,supportsEventDeduplication:!1,isActive:()=>!!pmwDataLayer?.pixels?.triple_whale?.shop})}(window.pmw=window.pmw||{})},440(e,t,a){"use strict";a.r(t);a(4423);!function(e){const t="triple_whale_contact_sent",a=["login","account-created"];e.bus.on("pmw:load-pixels",function(){pmwDataLayer?.pixels?.triple_whale?.shop&&!pmwDataLayer?.pixels?.triple_whale?.loaded&&e.consent.canPixelBeFired("statistics","Triple Whale")&&(e.loadTripleWhalePixel(),(()=>{try{const a=pmwDataLayer?.user;if(!a?.email?.raw&&!a?.phone?.raw)return;if(e.retrieveData(t))return;const r=e.adapters?.triple_whale?.adaptLogin?.({});if(!r)return;e.tripleWhaleTrackEvents(r),e.storeData(t,!0)}catch(e){console.error(e)}})())}),["add-to-cart","add-contact-info","begin-checkout","add-shipping-info","add-payment-info","login","account-created","purchase"].forEach(r=>{e.bus.on("pmw:pixel:"+r,i=>{if(!pmwDataLayer?.pixels?.triple_whale?.loaded)return;if(!e.shouldFireBrowserPixel(i,"triple_whale"))return;const n=a.includes(r);if(!n||!e.retrieveData(t))try{const a=i.pixels?.triple_whale;if(!a)return;e.tripleWhaleTrackEvents(a),n&&e.storeData(t,!0)}catch(e){console.error(e)}})})}(window.pmw=window.pmw||{})},6523(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4423),core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);(function(pmw,undefined){let checkoutIdentity=null;pmw.tripleWhaleSetIdentity=e=>{e&&"object"==typeof e&&(checkoutIdentity=checkoutIdentity||{},["email","phone","firstName","lastName"].forEach(t=>{e[t]&&(checkoutIdentity[t]=String(e[t]).trim())}),e.address&&"object"==typeof e.address&&(checkoutIdentity.address=checkoutIdentity.address||{},["zip","city","countryCode","provinceCode"].forEach(t=>{e.address[t]&&(checkoutIdentity.address[t]=String(e.address[t]).trim())})))},pmw.tripleWhaleGetIdentity=()=>checkoutIdentity;const getProductContext=()=>{const e={id:"",name:"",price:"",variant:""};if("product"!==pmwDataLayer?.shop?.page_type)return e;const t=pmw.platform.getMainProductId(),a=t?pmwDataLayer?.products?.[t]:null;if(!a)return e;e.id=t.toString(),e.name=a.name||"",e.price=a.price!==undefined&&null!==a.price?a.price.toString():"";const r=document.querySelector("input[name='variation_id']");return r?.value&&"0"!==r.value&&(e.variant=r.value),e},getTriplePixelData=()=>{const e={TripleName:pmwDataLayer.pixels.triple_whale.shop,ver:"2.17",plat:pmwDataLayer.pixels.triple_whale.plat,isHeadless:!0,product:{id:"",name:"",price:"",variant:""},search:""};try{e.product=getProductContext(),"search"===pmwDataLayer?.shop?.page_type&&(e.search=pmw.getSearchTermFromUrl()||"")}catch(e){console.error(e)}return e};pmw.loadTripleWhalePixel=()=>{try{if(!pmwDataLayer?.pixels?.triple_whale?.plat)return void pmw.console.error("Triple Whale: the data layer carries no platform, pixel not loaded");window.TriplePixelData=getTriplePixelData(),function(W,H,A,L,E,_,B,N){function O(U,T,P,H,R){void 0===R&&(R=!1),H=new XMLHttpRequest,P?(H.open("POST",U,!0),H.setRequestHeader("Content-Type","text/plain")):H.open("GET",U,!0),H.send(JSON.stringify(P||{})),H.onreadystatechange=function(){4===H.readyState&&200===H.status?(R=H.responseText,U.includes("/first")?eval(R):P||(N[B]=R)):(299<H.status||H.status<200)&&T&&!R&&(R=!0,O(U,T-1,P))}}if(N=window,!N[H+"sn"]){N[H+"sn"]=1,L=function(){return Date.now().toString(36)+"_"+Math.random().toString(36)};try{A.setItem(H,1+(0|A.getItem(H)||0)),(E=JSON.parse(A.getItem(H+"U")||"[]")).push({u:location.href,r:document.referrer,t:Date.now(),id:L()}),A.setItem(H+"U",JSON.stringify(E))}catch(e){}var i,m,p;A.getItem('"!nC`')||(_=A,A=N,A[H]||(E=A[H]=function(e,t,a){return void 0===a&&(a=[]),"State"==e?E.s:(W=L(),(E._q=E._q||[]).push([W,e,t].concat(a)),W)},E.s="Installed",E._q=[],E.ch=W,B="configSecurityConfModel",N[B]=1,O("https://conf.config-security.com/model",5),i=L(),m=A.screen,_.setItem("di_pmt_wt",i),p={id:i,action:"profile",avatar:_.getItem("auth-security_rand_salt_"),time:m.width+":"+m.height,host:A.TriplePixelData.TripleName,plat:A.TriplePixelData.plat,url:window.location.href,ref:document.referrer,ver:A.TriplePixelData.ver},O("https://api.config-security.com/event",5,p),O("https://api.config-security.com/first?host="+TriplePixelData.TripleName+"&plat="+TriplePixelData.plat,5)))}}("","TriplePixel",localStorage),pmwDataLayer.pixels.triple_whale.loaded=!0,pmw.console.log("Triple Whale: pixel loaded")}catch(e){console.error(e)}},pmw.tripleWhaleTrackEvent=e=>{try{if("function"!=typeof window.TriplePixel)return;if(!e?.event_name)return;
2window.TriplePixel(e.event_name,e.event_data),pmw.console.log("Triple Whale: "+e.event_name+" event sent",e.event_data)}catch(e){console.error(e)}},pmw.tripleWhaleTrackEvents=e=>{e&&(Array.isArray(e.events)?e.events.forEach(e=>pmw.tripleWhaleTrackEvent(e)):pmw.tripleWhaleTrackEvent(e))}})(window.pmw=window.pmw||{})},891(e,t,a){a(7817),a(6523),a(440)}}]);
3//# sourceMappingURL=pixel-triple-whale.e35f738b.chunk.min.js.map

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.