Yahoo

A guide to implement Criteo solutions in Yahoo.

Overview

This tutorial will explain how to generate Google Shopping Feed and install Criteo OneTag on your Yahoo site.

[[disclaimer-nonplugin]]

Feed

Please provide Criteo with a Google Shopping Feed. This feed must include the product SKU.

Tags

Copy + paste the each of the Criteo OneTag below into your templates on the Yahoo Store Platform:

Homepage Tag

<!-- Criteo Home Page Tag -->
<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: "setAccount", account: {{accountid}}},
        { event: "setSiteType", type: deviceType},
        { event: "setHashedEmail", email: [""]},
        { event: "viewHome", ecpplugin: "yahoo"}
);
</script>
<!-- END Criteo Home Page Tag -->

Product Tag

<!-- Criteo Product Page Tag -->
<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: "setAccount", account: {{accountid}}},
        { event: "setSiteType", type: deviceType},
        { event: "setHashedEmail", email: [""]},
        { event: "viewItem", ecpplugin: "yahoo", product: function(){ return PAGE_ATTRS.itemId; }, requiresDOM: "yes"}
);
</script>
<!-- END Criteo Product Page Tag -->

Basket / Cart Tag

<!-- Criteo Basket Page Tag -->
<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 pl= [];
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: "setAccount", account: {{accountid}}},
        { event: "setSiteType", type: deviceType},
        { event: "setHashedEmail", email: [""]},
        { event: "viewBasket", ecpplugin: "yahoo", product: function(){
                pl = [];
                for (var i= 0; i< ids.length; ++i) {
                        pl.push({
                                id: ids[i],
                                price: price[i],
                                quantity: qtys[i]});}
                    return pl;
        }
});
</script>
<!-- END Criteo Basket Page Tag --

Sales Confirmation Tag

<!-- Criteo Sales Page Tag -->
<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";
var pl = [];
window.criteo_q.push(
        { event: "setAccount", account: {{accountid}}},
        { event: "setSiteType", type: deviceType},
        { event: "setHashedEmail", email: [""]},
        { event: "trackTransaction", ecpplugin: "yahoo", id: orderNum, product: function() {
                pl = [];
                for (var i = 0; i < ids.length; ++i) {
                        pl.push({
                                id: ids[i],
                                price: price[i],
                                quantity: qtys[i]
                        });
                }
                return pl;
        }
});
</script>
<!-- END Criteo Sales Page Tag -->

OneTag 2.0

[[cname]]

Verification

[[accurate]]