Ime dogodka | Opis dogodka | Parametri | Zahtevani parametri |
---|---|---|---|
PageView | Privzeti dogodek, ki ga lahko postavite na vse strani. | ||
ViewContent | Ko je stran videna tako kot stran izdelka ali pa kategorije. | content_type, item_ids, value, currency | content_type , item_ids |
AddToCart | Ko je izdelek dodan v košarico. | value, currency, item_ids | value , currency , item_ids |
Purchase | Ko je nakup opravljen. | value, currency, transaction_id, item_ids | value , currency , transaction_id , item_ids |
Ime parametra | Opis parametra | Vrsta parametra |
---|---|---|
consent | Uporabniška privolitev za shranitev analitičnih piškotkov na njihovi napravi. Nastavite 1 v primeru uporabniške privolitve. V drugačnem primeru nastavite 0 za "ne". |
number |
content_type | Ali 'product' ali 'category'. | string |
item_ids |
Identifikator elementa, povezan z ViewContent , AddToCart or Purchase dogodkom. Uporabljajte vrednosti, ki so edinstvene in nespremenljive čez vašo celotno e-trgovino. Identifikator je sestavljen iz poljubnih kombinacij številk/nizov. Uporabite isti ID, kot ste ga zagotovili v feedu izdelkov za ITEM_ID.
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 | Vrednost izdelka ali naročila pri klicanju dogodka | number |
currency | Valuta za določeno value .. |
string |
transaction_id | ID transakcije. | string |
V vsakem dogodku, lahko uporabite katerikoli od teh identifikatorjev item_ids
, category_text
za identifikacijo vsebine, povezane z dogodkom. Uporabite najprimernejše za vašo prodajno rešitev. Prosimo, uporabite iste ID-je, kot jih uporabljate v svojem product feed.
To je unikatna številka izdelka - ID, ki ga boste uporabljali znotraj vaše e-trgovine.
GLAMI uporablja ITEM_ID za ločevanje produktov in zagotovljeno pravo sledenje.
Consent parameter omogoča spletnim stranem, da se prilagodijo GLAMI PiXlu na podlagi uporabnikove privolitve v piškotke. Če consent obstaja (vrednost 1
) ali pa če parameter ni nastavljen, bo GLAMI predelal celotne podatke. Brez privolitve (vrednost 0
) bodo podatki predelani anonimno, brez uporabe podatkov določenega uporabnika.
GLAMI PiXel je nujno potreben za optimalno delovanje vaše e-trgovine na GLAMI. Zato sedaj podpira Consent parameter, preko katerega partnerska e-trgovina GLAMI-ja posreduje informacije glede tega, ali je uporabnik privolil v ustvarjenje analitičnih piškotkov.
Za naslednje primere potrebujete API ključ, ki ga boste prejeli po registraciji trgovine.
Da storite tako, uporabite našo stran za registracijo trgovine.
Dodajte kodo na svoje spletne strani pred koncem </head>
oznake v HTML-ju strani:
To privzeto kodo postavite na vse strani. To kodo je mogoče razširiti z uporabo drugih dogodkov. Glej spodaj.
<!-- 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', 'si', { 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 -->
Dodajte to podaljšano kodo k vsaki strani s podrobnostmi o izdelku.
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) } );
Ta primer vam prikazuje kako naj bi izgledala koda na vsaki strani s podrobnostmi o izdelku.
<!-- 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', 'si', { 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 -->
Dodajte to podaljšano kodo k vsaki strani kategorij.
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) } );
Ta primer prikazuje kako naj bi izgledala koda na vsaki strani kategorij.
<!-- 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', 'si', { 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 -->
Imenujte to kodo na dogodku, ko je izdelek dodan v nakupovalno košarico.
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: 82.00, // product price currency: 'EUR' // product price currency } );
Dodajte to razširitveno kodo na vsako zahvalno/potrditveno stran.
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: 123.00, // order value (sum of product values) currency: 'EUR', // order value currency transaction_id: 'ORDER212' // order ID } );
Ta primer prikazuje, kako bi morala izgledati popolna koda na zahvalni/potrditveni strani.
<!-- 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', 'si', { 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: 123.00, // order value (sum of product values) currency: 'EUR', // order value currency transaction_id: 'ORDER212' // order ID } ); </script> <!-- End Glami piXel -->
Če želite na strani več kod pixlov, sledite tem navodilom.
Če želite shraniti nekaj pixel kod na eno stran, mora imeti vsak pixel edinstveno ime, ustvarjeno s create call-om. Ko gre za samo eno kodo pixla, te možnosti ni treba uporabljati.
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] } );
Vse kode pixlov morajo uporabljati enako unikatno ime.
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: 123.00, // order value (sum of product values), currency: EUR, transaction_id: 'ORDER2' } );
Ta primer prikazuje, kako bi morala izgledati popolna koda na zahvalni/potrditveni strani.
<!-- 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'); // <!-- SI tracker start glami( 'create', 'SI_API_KEY', 'si', { 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: 123.00, currency: 'EUR', transaction_id: 'ORDER1' } ); // SI 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', si, '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: 123.00, // order value (sum of product values), currency: EUR, transaction_id: 'ORDER2' } ); // some other tracker end --> </script> <!-- End Glami piXel -->
S to metodo lahko kadar koli spremenite vrednost parametra za soglasje za GLAMI Pixel. V primeru, da uporabljate upravitelja soglasja za piškotke (npr. cookiebot ali drugo), morate to soglasje predložiti podjetju GLAMI Pixel, potem ko je bilo odobreno. GLAMI Pixel se pogosto naloži pred dejanskim soglasjem prek upravitelja soglasja za piškotke. V tem primeru je treba poklicati naslednjo metodo in parametru posredovati novo vrednost soglasja.
glami('set', {consent: 1});
Če vaš splet uporablja Content Security Policy, morate omogočiti GLAMI Pixel Javascript kodo na vaši strani. Prosimo dodajte naslednja CSP pravila v vašo HTTP glavo odgovora na vašem spletnem strežniku:
Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' www.glami.si glamipixel.com; img-src www.glami.si glamipixel.com