Etkinlik ismi | Etkinlik açıklaması | Parametreler | Gerekli parametreler |
---|---|---|---|
PageView | Tüm sayfalara yerleştirilebilen varsayılan etkinlik. | ||
ViewContent | Ürün ya da kategori sayfası görünümü | content_type, item_ids, value, currency | content_type , item_ids |
AddToCart | Bir ürün alışveriş sepetine eklendiğinde. | value, currency, item_ids | value , currency , item_ids |
Purchase | Bir satın alma gerçekleştiğinde. | value, currency, transaction_id, item_ids | value , currency , transaction_id , item_ids |
Parametre ismi | Parametre açıklaması | Parametre türü |
---|---|---|
consent | Kullanıcının cihazında çerezlerin saklanmasına dair verdiği izin. Eğer kullanıcı izin verdiyse 1 olarak ayarlayın. İzin vermediyse 0 olarak ayarlayın. |
number |
content_type | 'product' ya da 'category'. | string |
item_ids |
ViewContent , AddToCart or Purchase etkinliğiyle ilişkili öğe tanımlayıcısı. Tüm mağazanızda benzersiz ve değişmez değerler kullanın. Arayıcı herhangi bir sayı/dizgi kombinasyonundan oluşur. ITEM_ID için ürün feed'inde sağladığınız kimliğin aynısını kullanın.
If you do not have the ITEM_ID for a specific product variant at the time of calling the event (for example, when the customer has not yet selected a specific size for the product), you can send the value of ITEMGROUP_ID to the item_ids parameter. This value must correspond with the value you send in the product feed. |
array |
value | Bu etkinliği gerçekleştiren bir kullanıcının değeri | number |
currency | value . için para birimi. |
string |
transaction_id | İşlem numarası. | string |
Her etkinlikte, etkinlikle ilişkili içeriği tanımlamak için item_ids
, category_text
tanımlayıcılardan birini kullanabilirsiniz. Mağaza çözümünüz için en uygun olanı kullanın. Lütfen, product feed'inizde kullandığınız aynı kimlikleri kullanın.
Kataloğunuzda kullandığınız benzeri olmayan ve alışveriş sitenizde yer alan ürün numarası.
GLAMI doğru takip ve ürün ayrımı için ITEM_ID parametresini kullanır.
İzin parametresi GLAMI Pixel'in kullanıcıların çerez izinlerine göre düzenleme yapmasına imkan verir. Eğer kullanıcı izni bulunuyorsa (değer 1
) ya da parametre girilmemişse, GLAMI tüm veriyi işler. Eğer kullanıcı izni bulunmuyorsa (değer 0
), kullanıcı bilgisi kullanılmaksızın veri anonim olarak işlenir.
GLAMI Pixel mağazanızın GLAMI'deki performansı açısından büyük önem taşır. Bu nedenle, yeni güncelleme "İzin" parametresini içermektedir. Bu parametre ile iş ortakları kullanıcıların çerez kullanımına izin verip vermediğine dair bilgiyi GLAMI ile paylaşır.
Mağaza kaydından sonra alacağınız API anahtarına, aşağıdaki örnekler için ihtiyacınız vardır.
Bunu yapmak için mağaza kayıt sayfanızı kullanın.
Kodu, sayfanın HTML'sindeki </head>
etiketinin bitişinden önce web sitenizin sayfalarına ekleyin:
Bu varsayılan kodu tüm sayfalara yerleştirin. Bu kod diğer etkinlikler kullanılarak genişletilebilir. Aşağıda bulabilirsiniz.
<!-- Glami piXel for ONLY_SAMPLE_SHOP_FOR_EXAMPLE --> <script> (function(f, a, s, h, i, o, n) {f['GlamiTrackerObject'] = i; f[i]=f[i]||function(){(f[i].q=f[i].q||[]).push(arguments)};o=a.createElement(s), n=a.getElementsByTagName(s)[0];o.async=1;o.src=h;n.parentNode.insertBefore(o,n) })(window, document, 'script', '//glamipixel.com/js/compiled/pt.js', 'glami'); glami( 'create', 'INSERT_YOUR_API_KEY_HERE', 'tr', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); </script> <!-- End Glami piXel -->
Bu eklenti kodunu tüm ürün detay sayfalarına ekleyin.
glami( 'track', 'ViewContent', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] content_type: 'product', item_ids: ['ADZXFLUX002'] // currently viewed product ID. Use the same ID as you use in the feed (ITEM_ID) } );
Bu örnek ürün detay sayfasında kodun nasıl olması gerektiğini gösterir.
<!-- Glami piXel for ONLY_SAMPLE_SHOP_FOR_EXAMPLE --> <script> (function(f, a, s, h, i, o, n) {f['GlamiTrackerObject'] = i; f[i]=f[i]||function(){(f[i].q=f[i].q||[]).push(arguments)};o=a.createElement(s), n=a.getElementsByTagName(s)[0];o.async=1;o.src=h;n.parentNode.insertBefore(o,n) })(window, document, 'script', '//glamipixel.com/js/compiled/pt.js', 'glami'); glami( 'create', 'INSERT_YOUR_API_KEY_HERE', 'tr', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'ViewContent', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] content_type: 'product', item_ids: ['ADZXFLUX002'] // currently viewed product ID. Use the same ID as you use in the feed (ITEM_ID) } ); </script> <!-- End Glami piXel -->
Bu eklenti kodunu tüm kategori sayfalarına ekleyin.
glami( 'track', 'ViewContent', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] content_type: 'category', item_ids: ['ADZXFLUX001', 'NRS02', 'NRS03', 'NRS04', 'NRS05', 'NRS06', 'NRS07', 'NRS08', 'NRS09', 'NRS10'], // currently viewed first 10 product IDs in the category. Use the same IDs as you use in the feed (ITEM_ID). category_text: 'Men | Shoes | Sneakers' // currently viewed category_text. Use the same category_text as you use in the feed (CATEGORYTEXT) } );
Bu örnek kategori sayfasında kodun nasıl olması gerektiğini gösterir.
<!-- Glami piXel for ONLY_SAMPLE_SHOP_FOR_EXAMPLE --> <script> (function(f, a, s, h, i, o, n) {f['GlamiTrackerObject'] = i; f[i]=f[i]||function(){(f[i].q=f[i].q||[]).push(arguments)};o=a.createElement(s), n=a.getElementsByTagName(s)[0];o.async=1;o.src=h;n.parentNode.insertBefore(o,n) })(window, document, 'script', '//glamipixel.com/js/compiled/pt.js', 'glami'); glami( 'create', 'INSERT_YOUR_API_KEY_HERE', 'tr', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'ViewContent', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] content_type: 'category', item_ids: ['ADZXFLUX001', 'NRS02', 'NRS03', 'NRS04', 'NRS05', 'NRS06', 'NRS07', 'NRS08', 'NRS09', 'NRS10'], // currently viewed first 10 product IDs in the category. Use the same IDs as you use in the feed (ITEM_ID). category_text: 'Men | Shoes | Sneakers' // currently viewed category_text. Use the same category_text as you use in the feed (CATEGORYTEXT) } ); </script> <!-- End Glami piXel -->
Ürün alışveriş sepetine eklendiğinde bu kodu etkinlikte arayın.
glami( 'track', 'AddToCart', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002'], // product ID currently added to a cart. Use the same ID as you use in the feed (ITEM_ID). value: 2495.00, // product price currency: 'TRY' // product price currency } );
Bu uzantı kodunu her teşekkür/onay sayfasına ekleyin.
glami( 'track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002', 'NRS01'], // bought product IDs. Use the same IDs as you use in the feed (ITEM_ID). value: 3742.50, // order value (sum of product values) currency: 'TRY', // order value currency transaction_id: 'ORDER212' // order ID } );
Bu örnek, bir teşekkür/onay sayfasında kodun nasıl görüneceğini gösterir.
<!-- Glami piXel for ONLY_SAMPLE_SHOP_FOR_EXAMPLE --> <script> (function(f, a, s, h, i, o, n) {f['GlamiTrackerObject'] = i; f[i]=f[i]||function(){(f[i].q=f[i].q||[]).push(arguments)};o=a.createElement(s), n=a.getElementsByTagName(s)[0];o.async=1;o.src=h;n.parentNode.insertBefore(o,n) })(window, document, 'script', '//glamipixel.com/js/compiled/pt.js', 'glami'); glami( 'create', 'INSERT_YOUR_API_KEY_HERE', 'tr', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002', 'NRS01'], // bought product IDs. Use the same IDs as you use in the feed (ITEM_ID). value: 3742.50, // order value (sum of product values) currency: 'TRY', // order value currency transaction_id: 'ORDER212' // order ID } ); </script> <!-- End Glami piXel -->
Tek bir sayfaya birden fazla pixel kodu yerleştirmek istiyorsanız lütfen bu açıklamaları takip edin.
Tek bir sayfaya birden fazla pixel kodu yerleştirmek istediğinizde, her pixel özel bir isimle tanımlanmalıdır. Tek bir pixel kodu olduğunda, tanımlayıcı ismi kullanmanıza gerek olmayacaktır:
glami( 'create', 'API_KEY', 'cz', 'PIXEL_IDENTIFIER', { consent: 1 // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } );
Pixel kodu için şu özel isim kullanılmalıdır:
glami( 'PIXEL_IDENTIFIER.track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'PIXEL_IDENTIFIER.track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002'], value: 3742.50, // order value (sum of product values), currency: TRY, transaction_id: 'ORDER2' } );
Bu örnek, bir teşekkür/onay sayfasında kodun nasıl görüneceğini gösterir.
<!-- Glami piXel for multiple shops --> <script> (function(f, a, s, h, i, o, n) {f['GlamiTrackerObject'] = i; f[i]=f[i]||function(){(f[i].q=f[i].q||[]).push(arguments)};o=a.createElement(s), n=a.getElementsByTagName(s)[0];o.async=1;o.src=h;n.parentNode.insertBefore(o,n) })(window, document, 'script', '//glamipixel.com/js/compiled/pt.js', 'glami'); // <!-- TR tracker start glami( 'create', 'TR_API_KEY', 'tr', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002', 'NRS01'], value: 3742.50, currency: 'TRY', transaction_id: 'ORDER1' } ); // TR tracker end --> // <!-- SK tracker start glami( 'create', 'SK_API_KEY', 'sk', 'sktracker', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'sktracker.track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'sktracker.track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002'], value: 50.00, currency: 'EUR', transaction_id: 'ORDER2' } ); // SK tracker end --> // <!-- some other tracker tracker start glami( 'create', 'SOME_OTHER_API_KEY', tr, 'sometrackername', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'sometrackername.track', 'PageView', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] } ); glami( 'sometrackername.track', 'Purchase', { consent: 1, // The user's consent to the storage analytical cookies on their devices. [0 = no; 1 = yes] item_ids: ['ADZXFLUX002'], value: 3742.50, // order value (sum of product values), currency: TRY, transaction_id: 'ORDER2' } ); // some other tracker end --> </script> <!-- End Glami piXel -->
GLAMI Pixel için onay parametresi değerini istediğiniz zaman değiştirmek için bu yöntemi kullanabilirsiniz. Bir çerez onay yöneticisi (örn. cookiebot vb.) kullanmanız durumunda, bu izni aldıktan sonra GLAMI Pixel'e göndermeniz gerekir. GLAMI Pixel, genellikle çerez onay yöneticisi aracılığıyla gerçek onaydan önce yüklenir. Bu durumda aşağıdaki yöntemi uygulamak ve "allow" parametresine yeni bir değer eklemek gerekir.
glami('set', {consent: 1});
Web'iniz Content Security Policy kullanıyorsa, sayfanızda GLAMI Pixel Javascript kodunu etkinleştirmeniz gerekir. Lütfen aşağıdaki CSP kurallarını web sunucunuzdaki HTTP yanıt başlığınıza ekleyin:
Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' www.glami.com.tr glamipixel.com; img-src www.glami.com.tr glamipixel.com