1function sendConversionTracking(type, data){ 2 if(type!="" && typeof(data)!=="undefined"){ 3 var item_id = ""; 4 var item_name = ""; 5 var item_price = ""; 6 var total_price = ""; 7 var quantity = ""; 8 var item_category = ""; 9 if(typeof(data.pid)!=="undefined" && data.pid!=="") item_id = data.pid; 10 if(typeof(data.name)!=="undefined" && data.name!=="") item_name = data.name; 11 if(typeof(data.price)!=="undefined" && data.price!=="") item_price = data.price; 12 if(typeof(data.total_price)!=="undefined" && data.total_price!=="") total_price = data.total_price; 13 if(typeof(data.quantity)!=="undefined" && data.quantity!=="") quantity = data.quantity; 14 if(typeof(data.category1)!=="undefined" && data.category1!=="") item_category = data.category1; 15 16 if(item_name!="" && item_id!=""){ 17 if(typeof(gtag)!=="undefined"){ //google 18 gtag('event', type, {'currency':'KRW','value':total_price,'items':[{'item_id':item_id,'item_name':item_name,'price':item_price,'quantity':quantity,'item_category':item_category}]}); 19 } 20 if(typeof(wcs)!=="undefined"){ //naver 21 var _conv = {}; 22 _conv.type = 'add_to_cart'; 23 _conv.items = [{'id':item_id,'name':item_name,'quantity':quantity,'payAmount':item_price,'category':item_category}]; 24 wcs.trans(_conv); 25 } 26 if(typeof(fbq)!=="undefined"){ //facebook pixel 27 fbq('track', 'AddToCart',{'content_name':item_name,'content_category':item_category,'content_ids':[item_id],'content_type':'product','value':item_price,'currency':'KRW'}); 28 } 29 } 30 } 31}
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.