Ja, det kan uppnås med hjälp av vår funktion för ”JavaScript-callback”. Här är ett exempel på pixelspårning:

    function customHotelCallback(data)
    {
        //console.log(data);

        //Now handle the posible events comming
        if(data.event == 'page_results')
        {
            var sjrn    = {};

            var sjrn_id = 1234;
            sjrn.hc1 = "Town";
            sjrn.hs1 = "Country";
            sjrn.hpr = "Hotel name";
            sjrn.et  = "hs";
            sjrn.hd1 = booking.arrivalDate;   // NOTE: if not in yyyy-mm-dd format, please contact your Sojern Act Manager
            sjrn.hd2 = booking.departureDate;
            sjrn.t   = booking.totalAdults;
            sjrn.hr  = Math.ceil(booking.totalAdults/2); // Guessing number of double rooms (not really available)
            sjrn.cid = sjrn.hd1+"|"+sjrn.hd2+"|"+sjrn.t+"|"+sjrn.hr+"|"+sjrn.hpr;
            var sjrn_s = "https://beacon.sojern.com/pixel/p/"+sjrn_id+"?";

            for (property in sjrn) {
                sjrn_s += property + "=" + encodeURIComponent(sjrn[property]) + "&";
            }

            sjrn_s = sjrn_s.slice(0,-1);

            var pl = document.createElement('script');
            pl.type = 'text/javascript';
            pl.async = true;
            pl.src = sjrn_s;
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(pl);
        }

        if(data.event == 'booking_completed')
        {

            var pl = document.createElement('script');
            pl.type = 'text/javascript';
            pl.async = true;
            pl.src = 'https://beacon.sojern.com/pixel/p/1234?cid='+booking.bookingId+'|'+booking.totalPrice+'|'+booking.arrivalDate+'|'+booking.departureDate+'|&hconfno='+booking.bookingId+'&hp='+booking.totalPrice+'&hd1='+booking.arrivalDate+'&hd2='+booking.departureDate+'';
            console.log(JSON.stringify(booking));
            console.log(pl.src);
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(pl);
        }
    }