PageSourceSearch

https://www.crownshop.sk/wa_script/js/fb_pixel_func.js

js crownshop.sk collected 2026-10-09 03:45:40 UTC 1,843 bytes, 57 lines download raw bytes

1// přidáva FB pixel event z JS
2
3function fb_pixel_init($product_id,$pocet_kusu,$type) {
4        $request = BS.extend(BS.Request.$default, {
5            data: {
6                action: "Fb_pixel_worker",
7                id_product: $product_id,
8                id_zakaznik: BS.User.id,
9                pocet_kusu: $pocet_kusu
10            },
11
12            success: function($data) {
13                if ($data.success)
14                {
15                  insert_code($type,$data,$product_id);
16                }
17            }
18        });
19        $.ajax($request);
20}
21
22function insert_code($type,$data,$product_id) {
23    if($type == 'addToCart' && typeof fbq !== 'undefined')
24    {
25        fbq('track', 'AddToCart', {value: $data.params.price,currency: $data.params.mena,content_ids: $product_id,content_type:'product'});
26    }
27
28}
29
30function add_to_cart_default_basket_settings()
31{
32    // přidá FB pixel event addToCart
33    // nastavení pro původní variantu
34    $( document ).ready(function() {
35        if(typeof (fb_pixel) !== "undefined")
36        {
37            // kliknutí z přehledu produktů
38            $(".buy_btn").on('click', function () {
39                var $pocet_kusu = $(this).parent().find(".prKs").val();
40                if(typeof ($pocet_kusu === "undefined"))
41                {
42                    $pocet_kusu = 1;
43                }
44                var $id_product = $(this).closest(".product").data('id');
45                fb_pixel_init($id_product,$pocet_kusu,'addToCart');
46
47            });
48
49            // kliknutí z detailu produktu
50            $("#buy_btn,.product-cart-btn-old").on('click', function () {
51                var $pocet_kusu = $(".product-cart-info-value").find("input[name='kusy']").val();
52                fb_pixel_init(product_information.id,$pocet_kusu,'addToCart');
53            });
54        }
55    });
56
57}

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.