Όνομα του event | Περιγραφή του event | Παράμετροι | Απαιτούμενες παράμετροι |
---|---|---|---|
PageView | Ένα βασικό event που πρέπει να τοποθετηθεί σε όλες τις σελίδες. | ||
ViewContent | Όταν προβάλλεται μια σελίδα, όπως μια σελίδα προϊόντος ή κατηγορίας. | content_type, item_ids, value, currency | content_type , item_ids |
AddToCart | Όταν ένα προϊόν προστίθεται στο καλάθι αγορών. | value, currency, item_ids | value , currency , item_ids |
Purchase | Όταν πραγματοποιείται μια αγορά. | value, currency, transaction_id, item_ids | value , currency , transaction_id , item_ids |
Όνομα παραμέτρου | Περιγραφή παραμέτρου | Είδος παραμέτρου |
---|---|---|
consent | Η συγκατάθεση του χρήστη για την αποθήκευση αναλυτικών cookies στις συσκευές του. Ορίστε 1 σε περίπτωση που ο χρήστης δώσει συγκατάθεση. Ορίστε 0 για “όχι“. |
number |
content_type | Είτε 'product' ή 'category'. | string |
item_ids |
Το αναγνωριστικό στοιχείου που σχετίζεται με το event ViewContent , AddToCart or Purchase . Χρησιμοποιήστε στοιχεία που είναι μοναδικά και αμετάβλητα σε ολόκληρο το ηλεκτρονικό σας κατάστημα. Το αναγνωριστικό αποτελείται από οποιονδήποτε συνδυασμό αριθμών και γραμμάτων. Χρησιμοποιήστε το ίδιο ID που παρέχετε στο feed των προϊόντων για 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 | Η αξία του προϊόντος ή της παραγγελίας κατά την κλήση του event | number |
currency | Νόμισμα για τη συγκεκριμένη value .. |
string |
transaction_id | ID συναλλαγής. | string |
Σε κάθε περίπτωση, μπορείτε να χρησιμοποιήσετε οποιοδήποτε από αυτά τα αναγνωριστικά item_ids
, category_text
για να προσδιορίσετε το περιεχόμενο που σχετίζεται με το event. Χρησιμοποιήστε το πιο κατάλληλο για τη λύση του καταστήματος σας. Χρησιμοποιήστε τα ίδια ID που χρησιμοποιείτε στο product feed.
Ο κωδικός του προϊόντος (id) όπως αυτός ορίζεται από εσάς.
Το GLAMI χρησιμοποιεί το ITEM_ID για να ξεχωρίσει τα προϊόντα και να διασφαλίσει σωστό tracking.
Η παράμετρος Consent επιτρέπει στους ιστότοπους να προσαρμόζουν τo GLAMI Pixel με βάση την κατάσταση συναίνεσης των χρηστών τους, όσον αφορά τα cookie. Εάν υπάρχει συναίνεση (παράμετρος 1
) ή δεν έχει οριστεί η παράμετρος, το GLAMI επεξεργάζεται πλήρως τα δεδομένα. Εάν δεν υπάρχει συναίνεση (παράμετρος 0
), η επεξεργασία των δεδομένων θα γίνεται ανώνυμα, χωρίς τη χρήση δεδομένων για συγκεκριμένο χρήστη.
Το GLAMI PiXel είναι σημαντικό για τη βέλτιστη λειτουργία του e-shop σας στο GLAMI. Υποστηρίζει πλέον την παράμετρο Consent, με την οποία το συνεργαζόμενο eshop δίνει πληροφορίες GLAMI σχετικά με το εάν ο χρήστης έχει συμφωνήσει στη δημιουργία αναλυτικών cookies.
Για τα παρακάτω παραδείγματα, θα χρειαστείτε ένα κλειδί API το οποίο θα λάβετε μετά την εγγραφή του καταστήματός σας.
Για να το κάνετε αυτό, χρησιμοποιήστε τη σελίδα εγγραφής κατάστηματος.
Προσθέστε τον κώδικα σε σελίδες HTML πριν από το τέλος του tag </head>
:
Τοποθετήστε αυτόν τον προεπιλεγμένο κώδικα σε όλες τις σελίδες. Αυτός ο κώδικας μπορεί να επεκταθεί χρησιμοποιώντας άλλα event. Δείτε παρακάτω.
<!-- Glami piXel for ΠΑΡΑΔΕΙΓΜΑ_ΚΑΤΑΣΤΗΜΑΤΟΣ --> <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', 'ΕΙΣΑΓΕΤΕ_ΤΟ_ΚΛΕΙΔΙ _API _ΕΔΩ', 'gr', { 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 -->
Προσθέστε αυτό το extension code σε κάθε σελίδα λεπτομέρειας προϊόντος.
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) } );
Αυτό το παράδειγμα δείχνει πώς πρέπει να εμφανίζεται ο πλήρης κώδικας σε κάθε σελίδα λεπτομέρειας προϊόντος.
<!-- Glami piXel for ΠΑΡΑΔΕΙΓΜΑ_ΚΑΤΑΣΤΗΜΑΤΟΣ --> <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', 'ΕΙΣΑΓΕΤΕ_ΤΟ_ΚΛΕΙΔΙ _API _ΕΔΩ', 'gr', { 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 -->
Προσθέστε αυτό το extension code σε κάθε σελίδα λίστας κατηγοριών.
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) } );
Αυτό το παράδειγμα δείχνει πώς πρέπει να εμφανίζεται ο πλήρης κώδικας σε κάθε σελίδα λίστας κατηγοριών.
<!-- Glami piXel for ΠΑΡΑΔΕΙΓΜΑ_ΚΑΤΑΣΤΗΜΑΤΟΣ --> <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', 'ΕΙΣΑΓΕΤΕ_ΤΟ_ΚΛΕΙΔΙ _API _ΕΔΩ', 'gr', { 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 -->
Καλέστε αυτόν τον κωδικό όταν εισαχθεί ένα προϊόν στο καλάθι.
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 } );
Προσθέστε αυτόν τον κωδικό επέκτασης σε κάθε σελίδα ευχαριστιών/επιβεβαίωσης.
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 } );
Αυτό το παράδειγμα δείχνει τον τρόπο εμφάνισης του πλήρους κώδικα σε μια σελίδα ευχαριστιών/επιβεβαίωσης.
<!-- Glami piXel for ΠΑΡΑΔΕΙΓΜΑ_ΚΑΤΑΣΤΗΜΑΤΟΣ --> <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', 'ΕΙΣΑΓΕΤΕ_ΤΟ_ΚΛΕΙΔΙ _API _ΕΔΩ', 'gr', { 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 -->
Ακολουθήστε αυτές τις οδηγίες για την τοποθέτηση κωδικών pixel σε μία σελίδα.
Για την τοποθετήση πολλάπλών κωδικών pixel σε μία σελίδα, κάθε pixel πρέπει να έχει τη δική του ονομασία, την οποία θα δημιουργήσετε μαζί με το pixel. Εάν έχετε μόνο ένα κωδικό 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] } );
Το ίδιο όνομα πρέπει να χρησιμοποιείται για όλες τις αιτήσεις των κωδικών pixel:
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' } );
Αυτό το παράδειγμα δείχνει τον τρόπο εμφάνισης του πλήρους κώδικα σε μια σελίδα ευχαριστιών/επιβεβαίωσης.
<!-- 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'); // <!-- GR tracker start glami( 'create', 'GR_API_KEY', 'gr', { 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' } ); // GR 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', gr, '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 -->
Μπορείτε να κάνετε χρήση αυτής της μεθόδου για να πραγματοποιείτε αλλαγή της παραμέτρου παροχής συναίνεσης για το GLAMI Pixel ανά πάσα στιγμή. Σε περίπτωση που κάνετε χρήση ενός διαχειριστή συναίνεσης cookies (για παράδειγμα cookiebot ή κάποιο άλλο), είναι απαραίτητο να υποβάλλετε αυτή τη συναίνεση στο GLAMI Pixel, εφόσον έχει χορηγηθεί. Συνήθως, το GLAMI Pixel έχει φορτώσει ήδη πριν από τη πραγματική παροχή συναίνεσης μέσω του διαχειριστή συναίνεσης cookies. Σ’ αυτή την περίπτωση, είναι απαραίτητο να ανακαλείτε την ακόλουθη μέθοδο και να προσθέσετε μια νέα παράμετρο στη παροχή συναίνεσης.
glami('set', {consent: 1});
Εάν το δίκτυο σας χρησιμοποιεί Content Security Policy, πρέπει να ενεργοποιήσετε τον κώδικα GLAMI Pixel Javascript στη σελίδα σας. Παρακαλούμε προσθέστε τους ακόλουθους κανόνες CSP, στην απάντηση της κεφαλίδας HTTP στο web server σας:
Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' www.glami.gr glamipixel.com; img-src www.glami.gr glamipixel.com