Görünüm:
Toplam 95 ürün görüntüleniyor.
', 'auto'); ga('require', 'ec'); if (typeof MEMBER_INFO.ID !== 'undefined' && MEMBER_INFO.ID > 0) { ga('set', 'userId', MEMBER_INFO.ID); } var KEY_MAPPING = { 'product' : { 'product_code' : 'code', 'product_id' : 'id', 'product_supplier_code' : 'supplier_code', }, 'cart' : { 'product_code' : 'sku', 'product_id' : 'id', 'product_supplier_code' : 'sku', }, 'order' : { 'product_code' : 'code', 'product_id' : 'identifier', 'product_supplier_code' : 'code', }, 'category' : { 'product_code' : 'code', 'product_id' : 'id', 'product_supplier_code' : 'supplier_code', } }; switch (PAGE_TYPE) { case 'product': var key = KEY_MAPPING['product'][identifier_type]; ga('ec:addProduct', { 'id': PRODUCT_DATA[0][key], 'name': PRODUCT_DATA[0]['name'], 'category': PRODUCT_DATA[0]['category'] }); ga('ec:setAction', 'detail'); ga('send', 'pageview'); break; case 'category': var key = KEY_MAPPING['category'][identifier_type]; for(var i = 0; i < PRODUCT_DATA.length; i++) { if(i > 20) break; ga('ec:addImpression', { 'id': PRODUCT_DATA[i][key], 'name': PRODUCT_DATA[i].name.substr(0, 35) || '', 'list': $('#category_name').val() || '', 'position': (i + 1), }); } ga('ec:setAction', 'detail'); ga('send', 'pageview'); break; case 'search': var key = KEY_MAPPING['category'][identifier_type]; for(var i = 0; i < PRODUCT_DATA.length; i++) { if(i > 20) break; ga('ec:addImpression', { 'id': PRODUCT_DATA[i][key], 'name': PRODUCT_DATA[i].name.substr(0, 35) || '', 'list': 'Arama Sonuçları', 'position': (i + 1), 'dimension1': $('#search_word').val() || '' }); } ga('ec:setAction', 'detail'); ga('send', 'pageview'); break; default: if (PAGE_TYPE === 'payment') { ga('set', 'page', '/order/payment'); } else if (PAGE_TYPE === 'address') { ga('set', 'page', '/order/address'); } ga('send', 'pageview'); break; } var orderPages = ['address', 'payment', 'approve']; if (orderPages.indexOf(PAGE_TYPE) === -1) { ApprovePageTracking.callbackArray.push(function(r) { var key = KEY_MAPPING['order'][identifier_type]; ga('set', 'currencyCode', r.currency === 'TL' ? 'TRY' : r.currency); for (var i = 0; i < r.products.length; i++) { ga('ec:addProduct', { 'id': r.products[i][key], 'name': r.products[i].name, 'category': r.products[i].category, 'price': r.products[i].amount_order, 'quantity': r.products[i].quantity }); } ga('ec:setAction', 'purchase', { 'id': r.transaction, 'affiliation': r.firm, 'revenue': r.amount_without_vat, 'tax': r.total_vat, 'shipping': r.cargo_price, }); ga('send', 'pageview'); }); } if (typeof Add2Cart !== 'undefined') { Add2Cart.callBack = function(r) { var key = KEY_MAPPING['cart'][identifier_type]; if (r.status === 3) { ga('ec:addProduct', { 'id': r.addedProduct[key], 'name': r.addedProduct.name, 'category': r.addedProduct.category, 'price': r.addedProduct.price, 'quantity': r.addedProduct.quantity }); ga('ec:setAction', 'add'); ga('send', 'event', 'UX', 'click', 'add to cart'); } } } console.log('Google Enchanced Ecommerce Analytics By Tsoft');
T-Soft E-Ticaret Sistemleriyle Hazırlanmıştır.