PageSourceSearch

https://www.buzzsneakers.sk/nb-public/themes/nbshop5_v5_8/_static/js/nbscript/criteo_tag.js?ver=1008_7.1

js buzzsneakers.sk collected 2026-10-06 20:00:34 UTC 4,551 bytes, 152 lines download raw bytes

1/* Start */
2function CriteoTag_metricData(metricData, typePage){
3
4    console.log('Loaded Criteo Tag');
5    window.CriteoTag = [];
6    if(typeof window.criteo_q === 'undefined' || window.criteo_q === null){
7        //window.criteo_q = [];
8        return false;
9    }
10    if(!metricData.criteoTagAccount){
11        console.log('No criteoAccountID');
12        return false;
13    }
14
15    switch(typePage) {
16        case 'home':
17            crioHomePage(metricData);
18            break;
19        case 'product':
20            crioProductPage(metricData);
21            break;
22        case 'product_list':
23            crioProductListPage(metricData);
24            break;
25        case 'cart':
26            getProductsCart(metricData);
27            break;
28        default:
29            break;
30    }
31   // getProductsCart(metricData);
32}
33
34function returnMail(mail){
35    if(mail){
36        return mail;
37    }
38    return '';
39}
40function usedDevice(){
41    console.log(navigator.userAgent);
42    var substring ='Mobile';
43    var device = false;
44    device = navigator.userAgent.includes(substring);
45    console.log(device);
46    if(device){
47        if(screen.width >= 768 && screen.width < 1025){
48            return 't';
49        }else{
50            return 'm';
51        }
52    }else{
53        return 'd';
54
55    }
56}
57
58function crioHomePage(data){
59    console.log('home');
60    if(data.uniqueCode === 'home'){
61        console.log('home1');
62        console.log();
63        window.criteo_q.push(
64            { event: "setAccount", account: data.criteoTagAccount },
65            { event: "setEmail", email: ''+returnMail(data.userEmail)+''},
66            { event: "setSiteType", type: ''+usedDevice()+''},
67            { event: "viewHome" }
68        );
69    }
70}
71
72function crioProductPage(data){
73console.log('product');
74    window.criteo_q.push(
75        { pageType: 'ProductPage' },
76        { event: "setAccount", account: data.criteoTagAccount },
77        { event: "setEmail", email: ''+returnMail(data.userEmail)+'' },
78        { event: "setSiteType", type: ''+usedDevice()+'' },
79        { event: "viewItem", item: ''+data.id+'' }
80    );
81}
82
83function crioProductListPage(data){
84    console.log('product_list');
85    if(data.uniqueCode === 'product_list'){
86        window.criteo_q.push(
87            { event: "setAccount", account: data.criteoTagAccount },
88            { event: "setEmail", email: ''+returnMail(data.userEmail)+'' },
89            { event: "setSiteType", type: ''+usedDevice()+'' },
90            { event: "viewList", item: getProductsIDs() }
91        );
92    }
93}
94
95function getProductsIDs(){
96    var ids = new Array();
97    $('.product-listing-items .product-item').each(function(){
98        ids.push(''+$(this).data('productid')+'');
99    });
100    return ids;
101}
102
103function getProductsCart(data){
104    console.log('cart page');
105    if(data.uniqueCode === 'cart' && nb_type_page !== 'cart_confirm' ){
106        console.log('cart');
107        var product_list = [];
108        var $wrapper = $('.cart .cart-table');
109        var quantity;
110        var id,price,priceC;
111        var ids = new Array();
112        //$wrapper.find('select').val();
113        if($wrapper.length === 0){
114            return
115        }
116            $wrapper.find('tr').each(function(){
117                id =  $(this).data('productid');
118                price =  $(this).data('productprice');
119                quantity = $(this).find('select').find(":selected").text();
120                quantity = parseInt(quantity, 10);
121                if(typeof id === 'undefined' || typeof id === undefined){
122                }else{
123                    priceC = price.replace(".", "");
124                    priceC = priceC.replace(",", ".");
125                    product_list.push(
126                        {id:''+id+'',price:priceC,quantity:quantity}
127                    );
128                }
129
130            });
131
132        window.criteo_q.push(
133            { event: "setAccount", account: data.criteoTagAccount },
134            { event: "setEmail", email: ''+returnMail(data.userEmail)+'' },
135            { event: "setSiteType", type: ''+usedDevice()+'' },
136            { event: "viewBasket", item: product_list}
137        );
138    }
139}
140
141function transactionCriteoTag(orderitems,orderid,data){
142    window.criteo_q.push(
143        { event: "setAccount",account: data.criteoTagAccount },
144        { event: "setEmail",  email: ''+returnMail(data.userEmail)+'' },
145        { event: "setSiteType",type: ''+usedDevice()+'' },
146        { event: "trackTransaction", id: ''+orderid+'',
147            item: [ orderitems ]}
148    );
149    console.log(orderitems);
150    console.log(orderid);
151}
152/* end*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.