Arzu Kap - Kadın Giyim Ürünleri ve Yeni Modeller
Yukarı

Gizlilik Politikası ve Çerez Uyarısı

Bu internet sitesinde sizlere daha iyi hizmet sunulabilmesi için Cookieler kullanılmaktadır. Cookie tercihlerinizi değiştirmek ve Cookieler hakkında detaylı bilgi almak için Gizlilik Politikası’nı inceleyebilirsiniz.

Tamam
'); fbq('track', 'PageView'); function trackFb(pageType, obj) { try { fbq('track', pageType, obj); } catch (err) { console.log(err); } } if (PAGE_TYPE == 'product') { try { trackFb('ViewContent', { content_name: ret(PRODUCT_TEMP.title), content_category: ret(PRODUCT_TEMP.category.title), content_ids: _dataFromKeymap(PRODUCT_TEMP), content_type: 'product', value: ret(PRODUCT_TEMP.price.discounted > 0 ? PRODUCT_TEMP.price.discounted : PRODUCT_TEMP.price.list), currency: ret(PRODUCT_TEMP.price.currency == 'TL' ? 'TRY' : PRODUCT_TEMP.price.currency) }); } catch (err) { console.log(err); } var $abf = document.getElementById("addbasketform"); $abf.addEventListener('submit', function () { trackFb('AddToCart', { content_name: ret(PRODUCT_TEMP.title), content_ids: _dataFromKeymap(PRODUCT_TEMP), content_type: 'product', value: ret(PRODUCT_TEMP.price.discounted > 0 ? PRODUCT_TEMP.price.discounted : PRODUCT_TEMP.price.list), currency: ret(PRODUCT_TEMP.price.currency == 'TL' ? 'TRY' : PRODUCT_TEMP.price.currency) }); }); } else if (PAGE_TYPE == 'category') { try { var category = CATEGORY_TEMP; var products = CATEGORY_PRODUCTS; var productData = []; for (var i in products) { productData.push(_dataFromKeymap(products[i])); } trackFb('ViewCategory', { content_name: category.title, content_type: 'product_group', content_ids: productData }); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'search') { try { var products = SEARCH_PRODUCTS; var productData = []; for (var i in products) { productData.push(_dataFromKeymap(products[i])); } trackFb('Search', { search_string: SEARCH_TEMP, content_ids: productData, content_type: 'product' }); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'basket') { try { var basketProductArr = []; var basketTotal = 0; var basketCurrency; $.ajax({ url: '/shopping/basket/basket/get', type: 'GET', dataType: 'json', success: function (r) { if (r.items == null) { return false; } basketCurrency = r.currency; basketTotal = (r.price.sub_total + r.price.vat_total).toFixed(2); var _i = 0; $.each(r.items, function (k, v) { basketProductArr[_i] = _dataFromKeymap(v); _i++; }); }, complete: function () { trackFb('CartItems', { content_ids: basketProductArr, content_type: 'product', value: basketTotal, currency: basketCurrency == 'TL' ? 'TRY' : basketCurrency }); } }); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'payment') { try { trackFb('AddPaymentInfo'); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'address') { try { trackFb('InitiateCheckout'); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'approve') { try { var approveOrderData = _ORDER; var currency = approveOrderData.price.currency == 'TL' ? 'TRY' : approveOrderData.price.currency; var productArr = []; for (var i = 0; i < approveOrderData.items.length; i++) { productArr[i] = _dataFromKeymap(approveOrderData.items[i]); } var purchaseData = { value: approveOrderData.price.totalPrice || 0, currency: ret(currency), content_type: 'product', content_ids: productArr }; trackFb('Purchase', purchaseData); console.log(purchaseData); } catch (err) { console.log(err); } } else if (PAGE_TYPE == 'memberConfirmation') { try { trackFb('CompleteRegistration', { status: true }); } catch (err) { console.log(err); } }