GLAMI piXel telepítése útmutató


Események

Esemény neve Esemény leírása Paraméterek Kötelező paraméterek
PageView Alapbeállítású esemény, ami minden oldalon elhelyezhető.
ViewContent Ha egy oldal termék vagy kategória oldalként van megtekintve. content_type, item_ids, value, currency content_type, item_ids
AddToCart Amikor egy terméket hozzáad a bevásárlókosárhoz. value, currency, item_ids value, currency, item_ids
Purchase Amikor vásárlás történik. value, currency, transaction_id, item_ids value, currency, transaction_id, item_ids

Paraméterek

Paraméter neve Paraméter leírása Paraméter típusa
consent A felhasználó hozzájárulása az analitikus sütik tárolásához az eszközén. Állítsd be az 1 értéket abban az esetben, ha a felhasználó engedélyt adott. Ellenkező esetben állítsd be a 0 értéket a "nem" esetén. number
content_type Vagy 'product', vagy 'category'. string
item_ids Termékek párosítása ViewContent, AddToCart or Purchase -ban megtörtént. Használj egyedi és változatlan értékeket az üzletedben. Azonosító tartalmazhat számot. sorszámot. Használd ugyanezeket az azonosítókat a feed-edben 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 Eseményt végrehajtó felhasználó értéke az üzlet számára number
currency Pénznem a specifikált value.-nél. string
transaction_id Tranzakció azonosító. string

Tartalom azonosítók

Bármelyiket ezen item_ids, category_text azonosítók közül az eseményhez társított tartalom azonosítására. Használd az üzleted számára legtesthezállóbb megoldást! Használja ugyanazokat az azonosítókat, mint a product feed-je esetében!


ITEM_ID

Ez egy egyedi termékszám - egy ID azonosító, melyet webüzleteden belül használsz.

Az ITEM_ID-t a GLAMI a termékek megkülönböztetésére és megfelelő nyomon követésükre használja.

  • Az érték betűk, számok, törtvonalak (/), fordított törtvonalak (\), kötőjelek (-), alulvonások (_), szóközök ( ), pontok (.) és kettőspontok (:) kombinációjából állhat.
  • A termékváltozatoknak, különböző méreteknek és színeknek egyedi ITEM_ID-val kell rendelkezniük.
  • Ugyanazt az értéket add meg a GLAMI piXel számára - ITEM_ID paraméter. Ellenkező esetben a GLAMI piXel nem fog megfelelően működni.
  • 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.


Consent

A consent paraméter lehetővé teszi a weboldalak számára, hogy a GLAMI Pixel viselkedését a felhasználók sütikkel kapcsolatos hozzájárulási státusza alapján állítsák be. Ha a hozzájárulás létezik (1 értékű) vagy a paraméter nincs beállítva, a GLAMI teljes mértékben feldolgozza az adatokat. Ha nincs hozzájárulás (0 értékű), az adatok feldolgozása anonim módon történik, a konkrét felhasználóra vonatkozó adatok felhasználása nélkül.

A GLAMI PiXel elengedhetetlen a GLAMI webáruház optimális működéséhez. Ezért mostantól támogatja a Consent paramétert, amely által a partner webáruház átadja a GLAMI-nak azt az információt, hogy a felhasználó beleegyezett-e az analitikus sütik létrehozásába.


Glami piXel kód példák


A következő példákhoz API kulcs szükséges, amit a bolt regisztrálása után kapsz meg.
Ahhoz, hogy ezt megtedd, használd a bolt regisztrációja oldalt.

  • Termék oldal -> ViewContent (type=product)
  • Kategória oldal -> ViewContent (type=category)
  • Adjon hozzá eseményt a bevásárlókosárhoz -> AddToCart
  • Rendelés megerősítési oldal -> Purchase
  • Minden második oldal -> PageView

Adja hozzá a kódot a honlapja oldalaihoz, mielőtt befejezi a </head> címkét az oldal HTML-jében:


PageView

Kérlek helyezd el ezt a alap kódot az összes oldalon. A kódot aztán különböző akciókban is lehet majd használni. Lásd:

<!-- Glami piXel for CSAK_PÉLDA_ÜZLET -->
<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',
    'IDE_HELYEZD_EL_API_KÓDODAT',
    'hu',
    {
        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 -->


ViewContent (product)

Add hozzá ezt a kiterjesztési kódot minden termékinformációs oldalhoz.

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)
    }
);

Példa a termékinformációs oldalra.

Ez a példa bemutatja, hogyan kell kinéznie a teljes kódnak minden termékinformációs oldalon.

<!-- Glami piXel for CSAK_PÉLDA_ÜZLET -->
<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',
    'IDE_HELYEZD_EL_API_KÓDODAT',
    'hu',
    {
        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 -->


ViewContent (category)

Add hozzá ezt a kiterjesztési kódot minden kategórialista oldalhoz.

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)
    }
);

Példa a kategória oldalra.

Ez a példa bemutatja, hogyan kell kinéznie a teljes kódnak minden kategória lista oldalon.

<!-- Glami piXel for CSAK_PÉLDA_ÜZLET -->
<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',
    'IDE_HELYEZD_EL_API_KÓDODAT',
    'hu',
    {
        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 -->


AddToCart

Hívd le ezt a kódot, amikor a tételt hozzáadtad a bevásárlókosárhoz.

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: 'HUF' // product price currency
    }
);


Purchase

Add hozzá ezt a kiegészítést a köszönjük/megerősítő oldaladhoz.

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: 'HUF', // order value currency
        transaction_id: 'ORDER212' // order ID
    }
);

Példa a `Köszönjük` oldal megerősítő oldalához.

Ezt a kódot add hozzá a köszönjük/megerősítő oldalhoz.

<!-- Glami piXel for CSAK_PÉLDA_ÜZLET -->
<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',
    'IDE_HELYEZD_EL_API_KÓDODAT',
    'hu',
    {
        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: 'HUF', // order value currency
        transaction_id: 'ORDER212' // order ID
    }
);
</script>
<!-- End Glami piXel -->


Több pixel telepítése egy oldalon

Kövesd ezeket az utasításokat, ha több pixel kódot szeretnél beilleszteni egy oldalra.

Ha több pixel kódot is szeretnél egy oldalra illeszteni, minden pixelnek egyedi azonosítóra van szüksége. Ezt az azonosótót a create call helyén adhatod meg. Ha csak egy pixel kód szerepel az oldalon, nem kell használnod ezt az azonosítót:

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]
    }
);

Ugyanez az egyedi név kell majd, hogy használva legyen a calls-okban a piXel kódban.

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: HUF,
        transaction_id: 'ORDER2'
    }
);

Ezt a kódot add hozzá a köszönjük/megerősítő oldalhoz.

<!-- 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');

// <!-- HU tracker start
glami(
    'create',
    'HU_API_KEY',
    'hu',
    {
        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: 'HUF',
        transaction_id: 'ORDER1'
    }
);
// HU 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',
    hu,
    '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: HUF,
        transaction_id: 'ORDER2'
    }
);
// some other tracker end -->
</script>
<!-- End Glami piXel -->

Ezzel a módszerrel bármikor módosíthatod a GLAMI Pixel hozzájárulási paraméterének értékét. Abban az esetben, ha cookie-k hozzájárulásának kezelőjét használod (pl. cookiebot vagy más), akkor a GLAMI Pixel számára a engedélyezést követően szükséges a hozzájárulást elküldeni. A GLAMI Pixel gyakran még a tényleges hozzájárulás előtt betöltődik a Cookie consent kezelőn keresztül. Ebben az esetben tanácsos követni a fenti módszert, és egy új értéket kell elfogadtatni a hozzájárulás paramétereként.


glami('set', {consent: 1});
            

Content Security Policy (CSP) beállítások

If your web uses Content Security Policy, you have to enable GLAMI Pixel Javascript code on your page. Please add the following CSP rules into your HTTP response header on your web server:

Content-Security-Policy: default-src 'self'; script-src 'unsafe-inline' www.glami.hu glamipixel.com; img-src www.glami.hu glamipixel.com