', PRODUCT_TYPE: 'id', // id or code GTAG_CURRENCY_TYPE: 'store_currency', SEND_MEMBER: 'false', GTAG_PRICE_WITH_TAX: parseInt('1'), }, config: { optimize_id: '573460676' }, 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(); GTAG_APP.metaForm(); }, 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_APP.hasMarketingConsent()) { 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, 'phone_number': window.MEMBER_INFO.PHONE_HASH_SHA } }) } }, 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 */ } if (!window.MEMBER_INFO || !window.MEMBER_INFO.ID || Number(window.MEMBER_INFO.ID) < 1) { gtag('set', 'user_data', { first_name : order.invoice_address?.firstName || '', email: order.__member?.mail || '', phone_number: order.invoice_address?.mobilePhone || '' }); } 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 }); } }); }, metaForm: () => { if ( typeof TSOFT_APPS === 'undefined' || !TSOFT_APPS.metaFormSubmit || !TSOFT_APPS.metaFormSubmit.callback ) { return; } TSOFT_APPS.metaFormSubmit.callback.push(function (response, formData) { const data = Object.fromEntries(formData.entries()); delete data['_token']; Object.keys(data).forEach(key => { if (key.toLowerCase().includes('token')) { delete data[key]; } }); const normalized = {}; Object.keys(data).forEach(key => { const cleanKey = key .replace('payload[', '') .replace(']', ''); normalized[cleanKey] = data[key]; }); gtag('event', 'form_submit', { form_name: 'Meta Form', form_data: JSON.stringify(normalized) }); // Google Ads conversion 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': 1, 'currency': 'TRY' }); } }); }, 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; } } }); }, hasMarketingConsent: () => { if (GTAG_APP.params.use_cookie_app !== 'true') { return true; } const newCookieMatch = document.cookie.match(/(?:^|;\s*)t-cookie-consent=([^;]+)/); if (newCookieMatch) { try { const consent = JSON.parse(decodeURIComponent(newCookieMatch[1])); return consent?.marketing === true; } catch (e) { console.warn('t-cookie-consent parse edilemedi', e); return false; } } // t-cookie-law kontrolü const lawCookieMatch = document.cookie.match(/(?:^|;\s*)t-cookie-law=([^;]+)/); if (lawCookieMatch) { try { const consent = JSON.parse(decodeURIComponent(lawCookieMatch[1])); return consent?.marketing === true; } catch (e) { console.warn('t-cookie-law parse edilemedi', e); return false; } } const oldCookieMatch = document.cookie.match(/(?:^|;\s*)CookieLaw=([^;]+)/); if (oldCookieMatch) { return oldCookieMatch[1] === '1'; } return false; }, } GTAG_APP.run();
Menü
Çiçek
Çiçek
Çikolata
Çikolata
Nikah Şekeri
Nikah Şekeri
Takı Sandığı
Takı Sandığı
Gelin Buketi
Gelin Buketi
Davetiye
Davetiye
Bebek Şekeri
Bebek Şekeri
Sünnet Şekeri
Sünnet Şekeri
Sepet
Sepet
Yüzük Tepsisi
Yüzük Tepsisi
Anı Defteri
Anı Defteri
Konvoy Süsü
Konvoy Süsü
Bebek Çikolatası
Bebek Çikolatası
AYDINLATMA ÜRÜNLERİNDE
AYDINLATMA ÜRÜNLERİNDE
AYDINLATMA ÜRÜNLERİNDE
AYDINLATMA ÜRÜNLERİNDE
ÇOK SATANLAR
Wos Wos Araba Magnet 3486
%19
27,00 TL
22,00 TL
Sade Çiçekli Nikah Şekeri 4017
%13
Şakayık İsteme & Söz Buketi 4130
%9
2.750,00 TL
2.500,00 TL
YENİ ÜRÜNLER
Şakayık İsteme & Söz Buketi 4130
%9
2.750,00 TL
2.500,00 TL
Sade Çiçekli Nikah Şekeri 4017
%13
İndirimli Ürünler
Şakayık İsteme & Söz Buketi 4130
%9
2.750,00 TL
2.500,00 TL
Sade Çiçekli Nikah Şekeri 4017
%13
İndirimli Nikah Şekeri 4126
%27
Güvenli Alışveriş
Güvenli Alışveriş
256Bit SSL sertifikası ile güvenli alışveriş
T-Soft 360 Logo T-SOFT E-Ticaret Sistemleriyle Hazırlanmıştır