Sign in

Welcome to our Support Center

Get help with integration and live campaigns

Welcome to our Support Center. Get help with integration and live campaigns

Managing multiple websites with the same Basket/Cart

What if I manage multiple websites but they share a Basket/Cart page?

If you manage multiple websites but they share the same Basket/Cart page, you will need to set-up a manual flush of events in the Criteo Onetag. 

For example you have two websites, EXAMPLE.COM and TEST.COM, and they share the same Cart page test.com/cart. You will need to add the manualFlush event to the tag, and flushEvents to each additional website purchased from. 

Example of manual flush implemented on the Criteo Onetag, on your Basket page:

<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q.push(
{ event: "manualFlush"},

{ event: "setAccount", account: TEST.COM ACCOUNT ID },
{ event: "setSiteType", type: deviceType },
{ event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },
{ event: "viewBasket", item: [ { id: "TEST.COM PRODUCT ID", price: TEST.COM UNIT PRICE, quantity: TEST.COM PRODUCT QUANTITY }
/* add a line for each product in the user's basket */
]},

{ event: "flushEvents"},
{ event: "setAccount", account: EXAMPLE.COM ACCOUNT ID },
{ event: "setSiteType", type: deviceType },
{ event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },
{ event: "viewBasket", item: [ { id: "EXAMPLE.COM PRODUCT ID", price: EXAMPLE.COM UNIT PRICE, quantity: EXAMPLE.COM PRODUCT QUANTITY }
/* add a line for each product in the user's basket */
]},

{ event: "flushEvents"}
);
</script>
Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk