Nume eveniment | Descriere eveniment | Parametrii | Parametrii necesari |
---|---|---|---|
PageView | Evenimentul implicit, care poate fi plasat pe toate paginile. | ||
ViewContent | Când o pagină este văzută ca un produs sau pagina de categorie. | content_type, item_ids, value, currency | content_type , item_ids |
AddToCart | Când un produs este adăugat în coș | value, currency, item_ids | value , currency , item_ids |
Purchase | Când o achiziție este efectuată. | value, currency, transaction_id, item_ids | value , currency , transaction_id , item_ids |
Nume parametru | Descriere parametru | Tip de parametru |
---|---|---|
consent | Consimțământul utilizatorului cu privire la stocarea cookie-urilor analitice pe device-ul folosit. Setează 1 dacă utilizatorul și-a dat acordul. În caz contrar setează 0 cu "nu". |
number |
content_type | Fie 'product' sau 'category'. | string |
item_ids |
Element de identificare asociat cu evenimentul ViewContent , AddToCart or Purchase . Utilizați valori care sunt unice și imuabile în întregul e-shop. Identificatorul constă din orice combinație de numere /șir. Utilizați același ID pe care l-ați furnizat în feedul de produse pentruITEM_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 | Valoarea unui utilizator care efectuează acest eveniment pentru companie | number |
currency | Valuta pentru value . specificată |
string |
transaction_id | ID de tranzacție | string |
În fiecare caz, puteți utiliza oricare dintre aceste identificatoare item_ids
, category_text
pentru a identifica conținutul asociat evenimentului. Utilizați soluția cea mai potrivită pentru magazinul dvs. Utilizați aceleași ID-uri pe care le utilizați în product feed dvs.
Acesta este un număr de produs unic - un ID pe care îl folosești pentru produs în magazinul online.
GLAMI folosește ITEM_ID pentru diferențierea produselor și pentru a avea un tracking corect.
Parametrul de consimțământ permite site-urilor să ajusteze comportamentul GLAMI Pixel în funcție de consimțământul utilizatorilor cu privire la cookie-uri. Dacă acesta există (valoarea 1
) sau parametrul nu este setat, GLAMI procesează datele integral. Dacă nu există consimțământul (valoarea 0
), datele vor fi procesate în mod anonim, fără a fi asociate unui anumit utilizator.
GLAMI PiXel este esențial pentru funcționarea optimă a magazinului tău pe GLAMI. Prin urmare, vine în sprijinul parametrului Consent (Consimțământ), prin care magazinul partener trimite către GLAMI informații dacă utilizatorul a fost sau nu de acord cu crearea cookie-urilor analitice.
Pentru următoarele exemple este necesară API Key, ce va fi generată după înregistrarea magazinului.
Pentru înregistrare, accesează pagina de înregistrare magazin.
Adăugați codul în paginile site-ului dvs înaintea tagului </head>
din HTML-ul paginii:
Plasați acest cod implicit pe toate paginile. Acest cod poate fi extins prin utilizarea altor evenimente. Vezi mai jos.
<!-- 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', 'ro', { 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 -->
Adaugă acest cod exitins pe fiecare pagină de produs detaliată.
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) } );
Acest exemply arată cum codul complet arată pe fiecare pagină de produs detaliată.
<!-- 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', 'ro', { 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 -->
Adaugă această extensie de cod pe fiecare pagină pentru lista de categorie de produs.
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) } );
Acest exemply arată cum ar trebui să fie codul în fiecare pagină unde este listată categoria de produs.
<!-- 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', 'ro', { 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 -->
Apelați la acest cod atunci când elementul este adăugat în coșul de cumpărături.
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: 350.00, // product price currency: 'RON' // product price currency } );
Adăugați acest cod de extensie la fiecare pagină de mulțumire / confirmare.
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: 525.00, // order value (sum of product values) currency: 'RON', // order value currency transaction_id: 'ORDER212' // order ID } );
Acest exemplu arată modul în care arată codul complet într-o pagină de mulțumire / confirmare.
<!-- 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', 'ro', { 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: 525.00, // order value (sum of product values) currency: 'RON', // order value currency transaction_id: 'ORDER212' // order ID } ); </script> <!-- End Glami piXel -->
Urmează aceste instrucțiuni atunci când vrei să plasezi coduri pixel multiple în aceeași pagină.
Atunci când vrei să plasezi coduri pixel multiple în aceeași pagină, fiecare pixel trebuie identificat printr-un nume unic. Acest nume trebuie menționat în procesul de creare. Acest identificator nu trebuie folosit atunci când pe o pagină apare un singur cod pixel.
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] } );
Același nume unic trebuie utilizat pentru call-uri pentru codul pixel respectiv:
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: 525.00, // order value (sum of product values), currency: RON, transaction_id: 'ORDER2' } );
Acest exemplu arată modul în care arată codul complet într-o pagină de mulțumire / confirmare.
<!-- 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'); // <!-- RO tracker start glami( 'create', 'RO_API_KEY', 'ro', { 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: 525.00, currency: 'RON', transaction_id: 'ORDER1' } ); // RO 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', ro, '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: 525.00, // order value (sum of product values), currency: RON, transaction_id: 'ORDER2' } ); // some other tracker end --> </script> <!-- End Glami piXel -->
Puteti folosi această metodă pentru modificarea parametrilor de consimțământ pentru GLAMI Pixel oricând e nevoie. În cazul în care folosiți deja un program de management al cookie-urilor pentru consimțământ (de exemplu cookiebot sau altele), este nevoie să îl prezentați către GLAMI Pixel de îndată ce acesta a fost acordat. GLAMI Pixel este de obicei încărcat prin Cookie Consent manager înainte de prezentul acord. În acest caz, e nevoie să apelați la prezenta metodă și să adăugați o nouă valoare pentru parametrul de consimțământ.
glami('set', {consent: 1});
Dacă browserul dvs folosește Content Security Policy, trebuie să activați codul pentru GLAMI Pixel Javascript în pagina dvs. Vă rugăm să adăugați următoarele reguli CSP în header-ul răspunsului HTTP:
Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' www.glami.ro glamipixel.com; img-src www.glami.ro glamipixel.com