Kurumsal Mean Well Katalog Bayiler İletişim
Bayiler
İSTANBUL
Koselli Dış Ticaret Ltd. Şti.
Perpa, A-Blok Kat:8 No:723 Şişli / İstanbul
Telefon 0212 3204546 (PBX)
Fax 0212 3203626
e-mail sales@koselli.com
Haritada Gör
Turan Mühendislik ve Elekt. San. Tic. AŞ.
Okçumusa cad. Menevşe İş Hanı No:54/90 Karaköy-İstanbul
Telefon 0212 2505151
Fax 0212 2505757
e-mail info@turanmuhendislik.com.tr
Haritada Gör
Anka elektrik Elektronik Müh. San. Tic. Ltd. Şti.
Ferhatpaşa Mahallesi G-12 Sokak No: 11 ATAŞEHİR / İSTANBUL
Telefon 0216 660 16 16 
Fax
e-mail info@ankamuh.com
Haritada Gör
Dostel Otomasyon Elektrik Elektronik San. Tic. Ltd. Şti.
Mescit Mah. Demokrasi Cad. Birmes Sanayi Sitesi No: 3 A10 Blok No / 12 Tuzla-istanbul
Telefon 0216 307 04 40
Fax 0216 307 04 71
e-mail satis@dostelotomasyon.net
Haritada Gör
Çağrı Elektrik Proje ve Taahhüt San. Tic. AŞ.
Beykent Sanayi Sitesi No :158, Büyükçekmece – İstanbul / Türkiye
Telefon 0212 872 08 08
Fax
e-mail info@cagrielektrik.com.tr
Haritada Gör
Tanel Elektrik Elektronik San. Tic. Ltd. Şti.
Perpa Tic. Merkezi. A Blok Kat:8 No: 765 Okmeydanı - İSTANBUL
Telefon 0 212 210 77 17
Fax
e-mail info@tanel.com.tr
Haritada Gör
Birleşik Elektrik ve Elektronik Oto. San. Tic. Ltd. Şti.
Eyüp Sultan Mah. İmam Rabbani Cd. Cihad Sk. No:39 Sancaktepe / İSTANBUL
Telefon 0216 545 76 30 pbx
Fax 0216 545 76 32
e-mail info@bestotomasyon.com
Haritada Gör
Dacel Mühendislik San. Tic. Ltd. Şti.
Oruçreis Mah. Tekstilkent Cd. Tekstilkent Ticaret Merkezi A8 Blok No:17/18/19 Esenler / İstanbul
Telefon 0212 210 7646
Fax 0212 220 5045
e-mail info@dacel.com.tr
Haritada Gör
Karaköy Elektronik
Necatibey Cad. Gür Han No:34 Kat:2 D:209 Karaköy 34425 Beyoğlu - İstanbul / TÜRKİYE
Telefon 0850 333 5759 (0850 333 KRKY)
Fax 0212 243 3941
e-mail karakoy@karakoyelektronik.com
Haritada Gör
ANKARA
Enkosis Endüstriyel Kontrol Sistemleri Ltd. Şti.
Elektrokent İş Merkezi 1467 Cad. No:2/7 İvedik Org. San. Bölgesi, Ostim / Ankara
Telefon 0 (312) 395 83 86
Fax 0 (312) 394 42 61
e-mail info@enkosis.com
Haritada Gör
İZMİR
Hatfon Elektronik San. Tic. AŞ.
1443 Sokak No:2/D B Blok Z-1-2-3 Tesisat İş Merkezi Yenişehir/ İzmir
Telefon 0232 469 59 00
Fax 0232 469 59 01
e-mail info@hatfon.com
Haritada Gör
BURSA
Kespo Elektronik San. Tic. Ltd. Şti.
ALAADDİNBEY MAH. 636. SOKAK NİLTİM NO: 40-42 NİLÜFER / BURSA
Telefon 0224 443 26 50
Fax 0224 443 26 50
e-mail info@kespo.com.tr
Haritada Gör
Ayfa Endüstriyel Teknoloji Ürünleri San. Tic. Ltd. Şti.
NİLÜFER TİC.MRK.NİLTİM 637.SK.KARDEMSAN PLAZA NO:7/H
Telefon 0224 4432346
Fax 0224 4432446
e-mail info@ayfaelektronik.com
Haritada Gör
Cemal Otomasyon Elektronik Elektrik San. Tic. Ltd. Şti.
ÜÇEVLER MH.64(220) SK.KÜÇÜK SAN.SİT.NİLTİM N:27/1
Telefon 0224 4434296
Fax 0224 4434298
e-mail muhasebe@cemalelektronik.com.tr
Haritada Gör
Bursa Tim Elektrik Otomasyon San. Tic. Ltd. Şti.
Alaaddinbey Mahallesi, 70. Sk. No 14/C 16120 Nilüfer/Bursa
Telefon 0224 443 38 46
Fax
e-mail info@bursatim.com.tr
Haritada Gör
Burendel Elektrik Ltd. Şti.
Gazcılar caddesi no : 18 OSMANGAZI / BURSA
Telefon 0 224 271 03 00
Fax 0 224 273 16 16
e-mail info@burendel.com
Haritada Gör
Turan Otomasyon Pano Mühendislik ve Elekt. San. Tic. Ltd. Şti
Alaaddin Bey Mah. 640 Sk. No:4 NİLÜFER / BURSA
Telefon 0 224 441 56 10
Fax 0 224 441 24 26 
e-mail info@turanotomasyon.com.tr
Haritada Gör
Nelkom Elektronik San. Tic. Ltf. Şti.
Alaaddin Bey Mah. 636 Sk. No:11 BB.1/2 NİLÜFER / BURSA
Telefon 0 216 232 30 84 
Fax
e-mail muhasebe@nelkom.com.tr
Haritada Gör
ADANA
Elektroser Makine Motor Trafo Bobinaj Müh. San. Tic. Ltd. Şti.
Abidinpaşa Cad. Karasoku Mah. 4 Sk. Y.Çelik İş Merkezi No:15 Seyhan / ADANA
Telefon 0 322 351 30 30
Fax 0322 359 38 28
e-mail
Haritada Gör
ANTALYA
Veysel Karakoç-Elektrik Elektronik Aydınlatma Sistemleri
SOĞUKSU MH.TOROSLAR CD.TEZCAN APT.NO:11/B MURATPAŞA / ANTALYA
Telefon 0242 3441445
Fax
e-mail info@inoxsled.com
Haritada Gör
KONYA
Samur Elektrik Elektronik San. Tic. Ltd. Şti.
Fevzi Çakmak Mahallesi Medcezir Caddesi 37/B Karatay / KONYA
Telefon 444 7 664
Fax 0 (332) 346 16 20
e-mail samur@samurelektronik.com
Haritada Gör
MALATYA
Nazlı Elektrik Elekt. Bilg. İletişim Taş. İnş. Paz. San. Tic. Ltd. Şti.
DABAKHANE MH.HALEP CD.NO:18/2A BATTALGAZİ / MALATYA
Telefon 0422 3238033
Fax 0422 3238033
e-mail nazlielektronik@hotmail.com
Haritada Gör
GAZİANTEP
Olimpiyat Otomasyon ve Müh. İth. İhr. San. Tic. Ltd. Şti.
İncilipınar Mah. 36001 Nolu Sokak Saray Apartmanı  No: 7/D Şehitkamil/GAZiANTEP
Telefon 0342 215 3575
Fax 0342 215 3576
e-mail olimpiyat@olimpiyatotomasyon.com.tr
Haritada Gör
KAHRAMANMARAŞ
Alba Yazılım Endüstriyel Ürünler San. Tic. Ltd. Şti.
Egemenlik Mah. Cahit Zarifoğlu Cad No 52/A Dulkadiroğlu/KAHRAMANMARAŞ
Telefon 0 344 235 2828
Fax 0 344 235 4700
e-mail info@albaelektronik.com
Haritada Gör
DENİZLİ
Vegatronik Endüstriyel Kontrol Sistemleri Ltd. Şti.
AHİ SİNAN Cad. YENİ KALEİÇİ ÇARŞISI NO:4 / 46 Merkez / DENİZLİ
Telefon 0 258 264 12 35
Fax 0 258 264 13 42
e-mail ayhan@vegatronik.com
Haritada Gör
YALOVA
Ümelsan Elektrik İnş. Day. Tüketim Malz. San. Tic. Ltd. Şti.
Çiftlik Mahallesi Küçük Sanayi Sitesi G Blok 24 /13-16 Çiftlikköy/YALOVA
Telefon 0226 812 93 68
Fax
e-mail satis@umelsan.com.tr
Haritada Gör
', PRODUCT_TYPE: '1', // id or code GTAG_CURRENCY_TYPE: 'currency', SEND_MEMBER: 'true', GTAG_PRICE_WITH_TAX: parseInt('0'), }, config: { optimize_id: '' }, setParams: () => { for (const [key, value] of Object.entries(GTAG_APP.params)) { GTAG_APP.params[key] = value === '{{' + key + '}}' || value === '' ? '' : value; } }, run: () => { GTAG_APP.setParams(); window.dataLayer = window.dataLayer || []; gtag('js', new Date()); GTAG_APP.setConfig(); gtag('config', GTAG_APP.params.GA4_TRACKING_ID, GTAG_APP.config); if (GTAG_APP.params.GTAG_ADWORDS_ID) { gtag('config', GTAG_APP.params.GTAG_ADWORDS_ID, window.MEMBER_INFO.ID > 0 ? {'allow_enhanced_conversions': true} : {}); } GTAG_APP.setUserData(); GTAG_APP.productDetail() GTAG_APP.selectItem() GTAG_APP.pageCategory() if (typeof THEME_VERSION !== 'undefined') { GTAG_APP.dynamicLoader(); }else{ GTAG_APP.dynamicLoaderV4(); } GTAG_APP.addToCart() GTAG_APP.wishList() GTAG_APP.login() GTAG_APP.register() GTAG_APP.orderApprove() GTAG_APP.pageCart() GTAG_APP.orderAddress() GTAG_APP.orderPayment() GTAG_APP.removeFromCart(); GTAG_APP.beginCheckout(); }, categoryTree: (categoryPath) => { categoryPath = categoryPath.split(' > '); if (categoryPath[categoryPath.length - 1] === '') { delete categoryPath[categoryPath.length - 1]; } let categoryTree = []; categoryPath.forEach((category, index) => { categoryTree['item_category' + (index === 0 ? '' : index + 1)] = category; }); return categoryTree; }, setUserData: () => { if (GTAG_APP.params.SEND_MEMBER === 'true' && window.MEMBER_INFO.MAIL !== '') { gtag('set', 'user_data', { 'email': window.MEMBER_INFO.MAIL, 'address': { 'first_name': window.MEMBER_INFO.FIRST_NAME, 'last_name': window.MEMBER_INFO.LAST_NAME, 'city': window.MEMBER_INFO.MEMBER_CITY, 'country': window.MEMBER_INFO.MEMBER_COUNTRY, 'postal_code': window.MEMBER_INFO.MEMBER_ZIP_CODE, } }) } }, setConfig: () => { if (GTAG_APP.params.SEND_MEMBER === "true" && window.MEMBER_INFO.ID > 0) { GTAG_APP.config.user_id = window.MEMBER_INFO.ID; } }, getCartItems: async () => { await TSOFT_APPS.get.cart.load(); const cartLoad = await TSOFT_APPS.get.result.cart.load; if (cartLoad === null) { return { items: [], value: 0, currency: GTAG_APP.currency, } } const products = cartLoad.PRODUCTS.map((product, index) => { let salePrice = parseFloat(parseFloat(product.PRICE_SELL).toFixed(2)); let discount = 0; if (product.IS_DISCOUNT_ACTIVE) { let priceNotDiscounted = parseFloat(parseFloat(product.PRICE_NOT_DISCOUNTED).toFixed(2)); discount = parseFloat(parseFloat(priceNotDiscounted - salePrice).toFixed(2)); } if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.VAT / 100))).toFixed(2)); } let item_variant = ''; if (typeof product.VARIANT1_NAME !== 'undefined'){ item_variant = product.VARIANT1_NAME; } if (typeof product.VARIANT2_NAME !== 'undefined'){ item_variant += ' ' + product.VARIANT2_NAME; } return { item_id: GTAG_APP.params.PRODUCT_TYPE === 'id' ? product.ID : product.PRODUCT_CODE, item_name: product.TITLE, index: index, item_brand: product.BRAND, item_list_id: product.CATEGORY_ID, item_list_name: product.CATEGORY_NAME, price: salePrice, discount: discount > 0 ? discount : 0, quantity: parseInt(product.COUNT), item_variant: item_variant, ...GTAG_APP.categoryTree(product.CATEGORY_PATH + product.CATEGORY_NAME), } }); return { items: products, value: Math.round(cartLoad.PRICE_GENERAL * 100) / 100, coupon: cartLoad.COUPON_CODE, currency: GTAG_APP.currency } }, selectItem: () => { if (window.PAGE_TYPE === "product") { const productData = PRODUCT_DATA[0]; let salePrice = parseFloat(parseFloat(productData.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (productData.vat / 100))).toFixed(2)); } let discount = 0; if (productData.total_base_price > productData.total_sale_price){ discount = parseFloat((productData.total_base_price - productData.total_sale_price).toFixed(2)); } gtag("event", "select_item", { "item_list_id": productData.category_id, "item_list_name": productData.category, "items": [ { "item_id": productData[GTAG_APP.params.PRODUCT_TYPE], "item_name": productData.name, "index": 0, "item_brand": productData.brand, "price": salePrice, "discount": discount > 0 ? discount : 0, "quantity": parseInt(productData.quantity) > 0 ? 1 : 0, ...GTAG_APP.categoryTree(productData.category_path + productData.category), } ] }); } }, productDetail: () => { setTimeout(function (){ if (window.PAGE_TYPE === "product") { const productData = PRODUCT_DATA[0]; let salePrice = parseFloat(parseFloat(productData.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (productData.vat / 100))).toFixed(2)); } let discount = 0; if (productData.total_base_price > productData.total_sale_price){ discount = parseFloat((productData.total_base_price - productData.total_sale_price).toFixed(2)); } gtag("event", "view_item", { "currency": GTAG_APP.currency, 'value': parseFloat(parseFloat(productData.total_sale_price).toFixed(2)), "items": [ { "item_id": productData[GTAG_APP.params.PRODUCT_TYPE], "item_name": productData.name, "index": 0, "item_brand": productData.brand, "item_list_id": productData.category_id, "item_list_name": productData.category, "price": salePrice, "discount": discount > 0 ? discount : 0, "quantity": parseInt(productData.quantity) > 0 ? 1 : 0, ...GTAG_APP.categoryTree(productData.category_path + productData.category), } ] }); } },500) }, pageCategory: () => { if (window.PAGE_TYPE === "category") { let category = { name: '', id: '', } if (typeof CATEGORY_DATA !== 'undefined') { category = CATEGORY_DATA; } const products = PRODUCT_DATA; gtag('event', 'view_item_list', { 'item_list_name': category.name, 'item_list_id': category.id, 'items': products.slice(0, 200).map((product, index) => { let salePrice = parseFloat(parseFloat(product.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.vat / 100))).toFixed(2)); } let discount = 0; if (product.total_base_price > product.total_sale_price){ discount = parseFloat((product.total_base_price - product.total_sale_price).toFixed(2)); } return { item_id: product[GTAG_APP.params.PRODUCT_TYPE], item_name: product.name, index: index, item_brand: product.brand, item_list_id: product.category_id, item_list_name: (product.category_path + product.category).replace(/ > /g, '/'), price: salePrice, discount: discount > 0 ? discount : 0, ...GTAG_APP.categoryTree(product.category_path + product.category), } }) }); } }, dynamicLoader: () => { TSOFT_APPS.product.dynamicLoader.push(function (products) { let sentProductIds = new Set(); const observer = new IntersectionObserver((entries) => { const newlyVisibleProducts = []; entries.forEach(entry => { if (entry.isIntersecting) { const el = entry.target; const productTitle = el.querySelector('.product-title') ? el.querySelector('.product-title').textContent : ''; // products içinde product.name i = title olanı bul const product = products.find(p => p.name === productTitle); if(typeof product !== 'undefined' && !sentProductIds.has(product.id)){ sentProductIds.add(product.id); newlyVisibleProducts.push(product); observer.unobserve(el); } } }); if(newlyVisibleProducts.length > 0){ gtag('event', 'view_item_list', { 'items': newlyVisibleProducts.map((product, index) => { let salePrice = parseFloat(parseFloat(product.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.vat / 100))).toFixed(2)); } let discount = 0; if (product.total_base_price > product.total_sale_price){ discount = parseFloat((product.total_base_price - product.total_sale_price).toFixed(2)); } return { id: product[GTAG_APP.params.PRODUCT_TYPE], name: product.name, list_name: product.category, brand: product.brand, category: (product.category_path + product.category).replace(/ > /g, '/'), list_position: index + 1, quantity: parseInt(product.quantity) > 0 ? 1 : 0, price: salePrice, discount: discount > 0 ? discount : 0 } }), }); } }, { threshold: 0.5 // %50'si görünüyorsa tetiklenir }); document.querySelectorAll('.product-item').forEach(el => observer.observe(el)) }); }, dynamicLoaderV4: () => { TSOFT_APPS.product.dynamicLoader.push(function (products) { gtag('event', 'view_item_list', { 'items': products.slice(0, 200).map((product, index) => { let salePrice = parseFloat(parseFloat(product.sale_price).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat((salePrice + (salePrice * (product.vat / 100))).toFixed(2)); } let discount = 0; if (product.total_base_price > product.total_sale_price){ discount = parseFloat((product.total_base_price - product.total_sale_price).toFixed(2)); } return { id: product[GTAG_APP.params.PRODUCT_TYPE], name: product.name, list_name: product.category, brand: product.brand, category: (product.category_path + product.category).replace(/ > /g, '/'), list_position: index + 1, quantity: parseInt(product.quantity) > 0 ? 1 : 0, price: salePrice, discount: discount > 0 ? discount : 0 } }), }); }); }, addToCart: () => { TSOFT_APPS.cart.callback.add.push(function (r) { if (([-1, 0].includes(r.status))) { return false; } let addedProduct = Array.isArray(r) ? r[0].addedProduct : r.addedProduct; let salePrice = parseFloat((addedProduct.price - (addedProduct.price * (addedProduct.vat / 100))).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { salePrice = parseFloat(addedProduct.price).toFixed(2); } let discount = 0; if (addedProduct.total_base_price > addedProduct.price){ const priceDiscount = addedProduct.total_base_price - addedProduct.price; discount = parseFloat((priceDiscount - (priceDiscount * (addedProduct.vat / 100))).toFixed(2)); if (GTAG_APP.params.GTAG_PRICE_WITH_TAX) { discount = parseFloat((addedProduct.total_base_price - addedProduct.price).toFixed(2)); } } gtag("event", "add_to_cart", { 'currency': GTAG_APP.currency, 'value': parseFloat(parseFloat(addedProduct.price).toFixed(2) * parseInt(addedProduct.quantity)), 'items': [ { 'item_id': addedProduct[GTAG_APP.params.PRODUCT_TYPE], 'item_name': addedProduct.name, 'index': 0, 'item_brand': addedProduct.brand, 'item_list_name': addedProduct.category, 'price': parseFloat(parseFloat(salePrice).toFixed(2)), "discount": (discount > 0 ? discount : 0) * parseInt(addedProduct.quantity), 'quantity': parseInt(addedProduct.change), ...GTAG_APP.categoryTree(addedProduct.category_path + addedProduct.category), } ] }); }) }, wishList: () => { TSOFT_APPS.product.wishList.callback.add.push(function (r) { if (r.status) { let product = r.data[0].product; gtag("event", "add_to_wishlist", { 'currency': GTAG_APP.currency, 'value': parseFloat(parseFloat(product.price).toFixed(2)), 'items': [ { item_id: product[GTAG_APP.params.PRODUCT_TYPE], item_name: product.name, index: 0, item_list_name: product.category_name, quantity: 1, price: parseFloat(parseFloat(product.price).toFixed(2)), ...GTAG_APP.categoryTree((product.category_path + product.category_name) || '') } ], }); } }) }, login: () => { TSOFT_APPS.page.tracking.login.callback.push(function (params) { if (params?.status === true || params?.status === 1 || params?.status === 2) { var group = params?.member?.group || params?.group || ''; if (typeof THEME_VERSION !== 'undefined' && THEME_VERSION === 'v5'){ group = params?.data?.[0]?.group || ''; } gtag("event", "login", { userGroup: group }); } }) }, register: () => { TSOFT_APPS.page.tracking.sign.callback.push(function (params) { if (params?.status === true || params?.status === 1 || params?.status === 2) { var group = params?.member?.group || ''; if (typeof THEME_VERSION !== 'undefined' && THEME_VERSION === 'v5'){ group = params?.data?.[0]?.group || ''; } gtag("event", "sign_up", { userGroup: group }); } }); }, pageCart: () => { TSOFT_APPS.page.cart.callback.push(async function (data) { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } gtag("event", "view_cart", cart); }) }, orderAddress: () => { TsoftAppsOrderAddressCallback(async function () { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } gtag("event", "add_shipping_info", cart); gtag('event', 'checkout_progress', { 'items': cart.items, 'checkout_step': 2 }); }); }, orderPayment: () => { const TsoftAppsOrderPayment = async function (params) { const cart = await GTAG_APP.getCartItems(); if (cart.items.length === 0) { return false; } cart.payment_type = params?.text || ''; gtag('event', 'checkout_progress', { 'items': cart.items, 'checkout_step': 3, 'payment_type': cart.payment_type }); gtag("event", "add_payment_info", cart); } if (typeof TsoftAppsOrderMakePaymentCallback === 'function') { TsoftAppsOrderMakePaymentCallback(async function (params) { await TsoftAppsOrderPayment(params); }) } else if (typeof TsoftAppsOrderPaymentCallback === 'function') { TsoftAppsOrderPaymentCallback(async function (params) { await TsoftAppsOrderPayment(params); }) } }, removeFromCart: () => { TSOFT_APPS.cart.callback.delete.push(function (params) { let deleteObj = false; if (params?.deletedProduct?.id){ deleteObj = params.deletedProduct; }else if (params?.type === 'decrement' && params?.addedProduct?.id){ deleteObj = params.addedProduct; } if (params.status && deleteObj?.id) { gtag("event", "remove_from_cart", { currency: GTAG_APP.currency, value: parseFloat(parseFloat(deleteObj.price * deleteObj.quantity).toFixed(2)), items: [ { item_id: deleteObj.id, item_name: deleteObj.name, index: 0, item_list_name: deleteObj.category, item_brand: deleteObj.brand, price: parseFloat(parseFloat(deleteObj.price).toFixed(2)), quantity: parseInt(deleteObj.change), ...GTAG_APP.categoryTree(params.addedProduct.category_path + params.addedProduct.category), } ] }); } }) }, orderApprove: () => { TsoftAppsOrderApproveCallback(function (order) { if (localStorage.getItem('mobilAppActive')) { return; /* webview purchase tetiklenmiyor */ } const currency = order[GTAG_APP.params.GTAG_CURRENCY_TYPE] === 'TL' ? 'TRY' : order[GTAG_APP.params.GTAG_CURRENCY_TYPE]; let taxPrice = parseFloat(parseFloat(order.total_vat).toFixed(2)); const products = order.products.map((product, index) => { const price = GTAG_APP.params.GTAG_CURRENCY_TYPE === 'currency' ? product.total_amount_order : product.total_amount_store let discount = 0; if (product.total_base_amount - product.total_amount > 0 ) { let priceNotDiscounted = parseFloat(parseFloat(product.total_base_amount).toFixed(2)); discount = parseFloat(parseFloat(priceNotDiscounted - product.total_amount).toFixed(2)); } return { item_id: GTAG_APP.params.PRODUCT_TYPE === 'id' ? product.identifier : product.code, item_name: product.name, index: index, item_brand: product.brand, item_list_id: product.category_id, item_list_name: product.category_name, quantity: parseInt(product.quantity), price: parseFloat(parseFloat(price).toFixed(2)), discount: discount > 0 ? discount : 0, ...GTAG_APP.categoryTree(product.category_path + product.category_name) } }); let orderValue = products.reduce((acc, product) => { return acc + (product.price * product.quantity); }, 0); gtag("event", "purchase", { 'transaction_id': order.transaction, 'value': parseFloat(parseFloat(orderValue).toFixed(2)), 'tax': taxPrice, 'shipping': parseFloat(parseFloat(order.cargo_price).toFixed(2)), 'currency': currency, 'coupon': order.coupon, 'items': products }); //For Track Ads conversions if (GTAG_APP.params.GTAG_ADWORDS_ID !== '') { gtag('event', 'conversion', { 'send_to': GTAG_APP.params.GTAG_ADWORDS_ID + '/' + GTAG_APP.params.GTAG_ADWORDS_LABEL, 'value': parseFloat(orderValue.toFixed(2)), 'currency': currency, 'transaction_id': order.transaction }); } }); }, beginCheckout: () => { if (GTAG_APP.beginCheckoutButton) { return; } GTAG_APP.beginCheckoutButton = true; document.addEventListener('click', async function (event) { if (!event.target.closest) return; const button = event.target.closest('#addCartBtn, #cart-buy-btn, [data-toggle="link-checkout"]'); if (typeof THEME_VERSION == 'undefined' && (typeof PAGE_TYPE != 'undefined' && PAGE_TYPE != 'cart')) return; if (button) { event.preventDefault(); try { const cart = await GTAG_APP.getCartItems(); if (cart.items.length > 0) { gtag("event", "begin_checkout", cart); } } catch (error) { } finally { let href = button.getAttribute('href'); if (!href || href === 'null' || href === '#') { href = '/' + PAGE_LINK.ORDER || '/order'; } window.location.href = href; } } }); } } GTAG_APP.run();
T-Soft E-Ticaret Sistemleriyle Hazırlanmıştır.