Shoper

Setup guides.

Overview

This guide explains the Criteo integration for the Shoper platform.

[[disclaimer-nonplugin]]

Criteo Product Feed

In the Shoper platform, the product feed can be generated through administrative platform by following steps below.

  1. Login to the Shoper admin panel.

  2. Go to Assortment > Products (Asortyment > Produkty) menu option. Products

  3. Click on Export (Eksportuj) button on this page. Export

  4. Click on Create a CSV profile (utwórz profil CSV) option. Create New Profile

  5. Fill out the profile as following and click on Save (Zapisz) button. Profile

  6. Choose and name following options as stated below, then save it.

Field (Pole) Name in the file (Nazwa w pliku)
Product code (Kod produktu) id
Barcode (Kod kreskowy) gtin
Category (Kategoria) categoryid1
Currency (Waluta) currency
Name (Nazwa) name
Description (Opis) description
Price (Cena) price
Wholesale price (Cena hurtowa) retailprice
Availability (Dostępność) availability
Photos (Zdjęcia) bigimage
URL producturl
  1. Click on Export (Eksportuj) button. Export

  2. Click on Export button at the bottom, then select download file (pobierz plik) option to download your .CSV file. Export Download

Criteo OneTag Setup

  1. Login to the Shoper admin panel.

  2. Go to Configuration > Integrations > Own Integrations (Konfiguracja > Integracje > Integracje własne ) menu option. Own Integrations

  3. Backup all the scripts in the Page footer, before closing < / body> (Stopka strony, przed zamknięciem < / body>) section.

  4. Copy and paste following Javascript codes in the Page footer, before closing < / body> (Stopka strony, przed zamknięciem < / body>) section and save it.

{if context == "index" }

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(  
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "viewHome", "ecpplugin": "shoper"}
);
},{ lang: 'pl_PL' });
</script>
{/if}

{if context == "product_list" }

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
var productIds = [];

{products}
    productIds.push("{products.product_id}");
{/products}

var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "viewList", item: productIds, "ecpplugin": "shoper"}
);
},{ lang: 'pl_PL' });
</script>
{/if}

{if context == "product_promo" }

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
var productIds = [];

{products}
    productIds.push("{products.product_id}");
{/products}

var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "viewList", item: productIds, "ecpplugin": "shoper"}
);
},{ lang: 'pl_PL' });
</script>
{/if}

{if context == "product"}

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(  
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "viewItem", item: {product_id}, "ecpplugin": "shoper"}
);
},{ lang: 'pl_PL' });
</script>

{/if}


{if context == "basket" }
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
frontAPI.getBasketInfo(function (basket) {

var items = [];
var i;

for(i=0; i<basket.products.length; i++){
    var basketItem = new Object();
    basketItem.id = basket.products[i].product_id;
    basketItem.price = basket.products[i].price_float;
    basketItem.quantity = basket.products[i].quantity;
    items.push(basketItem);
}
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(   
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "viewBasket", item: items, "ecpplugin": "shoper"});

});
},{ lang: 'pl_PL' });
</script>
{/if}

{if context == "basket_done" }
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript" src="https://cdn.dcsaas.net/js/front-api-1.0.3.min.js"></script>
<script type="text/javascript">
frontAPI.getUser(function (userInfo) { 
var items = [];

{products}
    var transaction = new Object();
    transaction.id = {products.product_id};
    transaction.price = {products.float_price};
    transaction.quantity = {products.quantity};
    items.push(transaction);
{/products}

var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(   
        { event: "setAccount", account: {{accountid}} },
        { event: "setEmail", email: userInfo.email },
        { event: "setSiteType", type: deviceType },
        { event: "trackTransaction", id: {order_id}, item: items, "ecpplugin": "shoper" }
);
},{ lang: 'pl_PL' });
</script>
{/if}

Verification

[[accurate]]