Criteo

Criteo is available as a tracking and remarketing tool on Shopgate.

By entering your Criteo account ID in a code snippet, you will be able to position targeted ads in front of customers or potential customers who had previously visited your mobile shop.

In this article, you will find everything you need to set up Criteo in your Shopgate mobile shop.

 

Locating Tracking Code function

The Criteo tracking service can be implemented with the Shopgate Tracking Code function. To locate the Tracking Code function, follow the steps below:

  1. Log in to your Shopgate Admin page.
  2. Click on Settings from the menu bar, then select Tracking Tools.
  3. On this page, you will find all the tracking tools and services supported at Shopgate. To set up Criteo, look for the section Tracking codes at the bottom of the page.
    To learn more about the Shopgate tracking codes, read Setting up tracking codes for your mobile shop

 

Embedding codes (Mobile Website only)

Criteo tracks visits to your mobile website only. To track activities in your native apps, use other tracking tools supported at Shopgate.

To set up Criteo tracking, embed a tracking code in the following pages of your mobile website (platform):

Available Platform Available Page
Smartphone

Start page (Homepage)
Product list
Product detail page
Shopping Cart
Checkout Success

Tablet

Start page (Homepage)
Product list
Product detail page
Shopping Cart
Checkout Success

 

Platform: Smartphone

  1. Select Mobile Webseite Smartphone as the platform. Select a page listed here, then click +Add:
    • Start Page (Homepage)
    • Product detail page
    • Product list
    • Shopping Cart
    • Checkout Success
  2. An empty script editor will open. Paste the tracking code (shown below) accordingly. Replace the XXXX with your Criteo account ID.
  3. Repeat the steps until all 4 pages have been added.

Start Page (Homepage)

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "m"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewHome"}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

Product detail page

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "m"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewItem", item: sgData.product.productNumber}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

Product list

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "m"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewList", item: [
		sgData.products[0].productNumber,
		sgData.products[1].productNumber,
		sgData.products[2].productNumber
	]}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);
 

Shopping Cart

if (sgData.cart.productsCount > 0) {
window.criteo_q = window.criteo_q || [];
	window.criteo_q.push(
		{event: "setAccount", account: xxxxx},
		{event: "setSiteType", type: "m"}
	);
	
	if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
	}

	var critItems = []; 
	for ( var i in sgData.cart.products) {
		var prod = sgData.cart.products[i];
		var critItem = {
			id: prod.productNumber,
			price: prod.amount.gross,
			quantity: prod.quantity
		};
		critItems.push(critItem);		
	}

	window.criteo_q.push(
		{event: "viewBasket", item: critItems}
	);

	var kolCritJs = document.createElement("script");
	kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
	document.body.appendChild(kolCritJs);
} 

Checkout Success

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{ event: "setAccount", account: xxxxx },
	{ event: "setSiteType", type: "m" },
	{ event: "setEmail", email: sgData.order.user.email }
);
var critItems = []; 
for ( var i in sgData.order.products) {
	var prod = sgData.order.products[i];
	var critItem =
		{ id: prod.productNumber, price: prod.amount.gross, quantity: prod.quantity }
		;
	critItems.push(critItem); 
}
window.criteo_q.push(
	{ event: "trackTransaction", id: sgData.order.number, item: critItems}
);
var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

 

Platform: Tablet

  1. Select Mobile Webseite Tablet as the platform. Select a page listed here, then click +Add:
    • Start Page (Homepage)
    • Product detail page
    • Product list
    • Shopping Cart
    • Checkout Success
  2. An empty script editor will open. Paste the tracking code (shown below) accordingly. Replace the XXXX with your Criteo account ID.
  3. Repeat the steps until all 4 pages have been added.

Start Page (Homepage)

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "t"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewHome"}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

Product detail page

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "t"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewItem", item: sgData.product.productNumber}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

Product list

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{event: "setAccount", account: xxxxx},
	{event: "setSiteType", type: "t"}
);

if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
}

window.criteo_q.push(
	{event: "viewList", item: [
		sgData.products[0].productNumber,
		sgData.products[1].productNumber,
		sgData.products[2].productNumber
	]}
);

var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

Shopping Cart

if (sgData.cart.productsCount > 0) {

	window.criteo_q = window.criteo_q || [];
	window.criteo_q.push(
		{event: "setAccount", account: xxxxx},
		{event: "setSiteType", type: "t"}
	);
	
	if(sgData.user.loggedIn === true){
	window.criteo_q.push(
		{event: "setEmail", email: sgData.user.email }
	);
	}

	var critItems = []; 
	for ( var i in sgData.cart.products) {
		var prod = sgData.cart.products[i];
		var critItem = {
			id: prod.productNumber,
			price: prod.amount.gross,
			quantity: prod.quantity
		};
		critItems.push(critItem);		
	}

	window.criteo_q.push(
		{event: "viewBasket", item: critItems}
	);

	var kolCritJs = document.createElement("script");
	kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
	document.body.appendChild(kolCritJs);
}

Checkout Success

window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
	{ event: "setAccount", account: xxxxx },
	{ event: "setSiteType", type: "t" },
	{ event: "setEmail", email: sgData.order.user.email }
);

var critItems = []; 
for ( var i in sgData.order.products) {
	var prod = sgData.order.products[i];
	var critItem =
		{ id: prod.productNumber, price: prod.amount.gross, quantity: prod.quantity }
		;
	critItems.push(critItem); 
}

window.criteo_q.push(
	{ event: "trackTransaction", id: sgData.order.number, item: critItems}
);
var kolCritJs = document.createElement("script");
kolCritJs.src = '//static.criteo.net/js/ld/ld.js';
document.body.appendChild(kolCritJs);

 

That's it! You have successfully set up your tracking codes.

 

For a better understanding on the tracking codes function and all its options, please read Setting up tracking codes for your mobile shop.

 

Was this article helpful?
0 out of 0 found this helpful