PageSourceSearch

https://hotel-kindl.at/(cms)/module/static/customer/2/website/tracking_code/js/tao-shim.js

js hotel-kindl.at collected 2026-09-26 18:54:59 UTC 6,614 bytes, 192 lines download raw bytes

1// extract from tao-tracking-simple.js for cms webpages without tao, but with dependencies for this js-funcs (like ibe)
2
3var tao_version = 2;
4var tao_object_id = 0;
5var tao_image_output = false;
6
7function tao_report_conversion( c_type, c_ref, c_email, c_amount, c_city, c_country, c_time_from, c_time_to, c_query, c_gender, block_iframe, c_resource_id, c_resource_name, c_conversion_items ) {
8    var c = {};
9    if( c_type ) c['c_type'] = c_type; else return;
10    if( c_ref ) c['c_ref'] = c_ref;
11    if( c_email ) c['c_email'] = c_email;
12    if( c_amount ) c['c_amount'] = c_amount;
13    if( c_gender ) c['c_gender'] = c_gender;
14    if( c_city ) c['c_city'] = c_city;
15    if( c_country ) c['c_country'] = c_country;
16    if( c_time_from ) c['c_time_from'] = c_time_from;
17    if( c_time_to ) c['c_time_to'] = c_time_to;
18    if( c_resource_id ) c['c_resource_id'] = c_resource_id;
19    if( c_resource_name ) c['c_resource_name'] = c_resource_name;
20    if( typeof tao_c_query_fields=='object' ) {
21        for(var k in tao_c_query_fields) {
22            c['c_ff['+k+']'] = tao_c_query_fields[k];
23        }
24    }
25
26    if ( typeof tao_page_session != 'undefined' ) {
27        c['page_session'] = tao_page_session;
28    }
29    if( typeof tao_page_language != 'undefined' ) {
30        c['page_language'] = tao_page_language;
31    }
32    if ( typeof tao_impression_unique != 'undefined' ) {
33        c['tao_impression_unique'] = tao_impression_unique;
34    }
35    if( c_query ) c['c_query'] = c_query;
36
37    tao_iframe_request(
38        '/(cms)/module/pass/96/conversion/' + tao_object_id + '/?' + tao_str_query_build( c ) + tao_conversion_items_parse(c_conversion_items)
39    );
40}
41
42function tao_report_impression( page_sub_type, page_sub_name, page_sub_content, page_sub_detail ) {
43    tao_impression_unique = Math.random()*10000+1;
44    var data = tao_impression_data( );
45    data['page_sub_type'] = page_sub_type;
46    data['page_sub_name'] = page_sub_name;
47    if( typeof page_sub_content != 'undefined' ) {
48        data['page_sub_content'] = page_sub_content;
49    }
50    if( typeof tao_page_language != 'undefined' ) {
51        data['page_language'] = tao_page_language;
52    }
53    if( typeof page_sub_detail != 'undefined' ) {
54        data['page_sub_detail'] = page_sub_detail;
55    }
56    tao_iframe_request(
57        '/(cms)/module/pass/96/impression/' + tao_object_id + '/?'+tao_str_query_build( data )
58    );
59}
60
61
62function tao_impression_data( ) {
63    var data = {};
64    data['r'] = tao_str_rand( );
65    
66    data['page_url'] = location.href;
67    if( typeof tao_page_name != 'undefined' ) {
68        data['page_name'] = tao_page_name;
69    } else if( document.title && document.title.length > 0 ) {
70        data['page_name'] = document.title;
71    }
72    
73    if( typeof tao_page_reference != 'undefined' ) {
74        data['page_reference'] = tao_page_reference;
75    }
76    if( typeof tao_page_reference_parent != 'undefined' ) {
77        data['page_reference_parent'] = tao_page_reference_parent;
78    }
79    if( typeof tao_page_language != 'undefined' ) {
80        data['page_language'] = tao_page_language;
81    }
82    
83    if( typeof tao_page_sub_type != 'undefined' ) {
84        data['page_sub_type'] = tao_page_sub_type;
85    }
86    if( typeof tao_page_sub_name != 'undefined' ) {
87        data['page_sub_name'] = tao_page_sub_name;
88    }
89    
90    if ( typeof tao_page_session != 'undefined' ) {
91        data['page_session'] = tao_page_session;
92    }
93    
94    if ( typeof tao_impression_unique != 'undefined' ) {
95        data['tao_impression_unique'] = tao_impression_unique;
96    }
97
98    return data;
99}
100
101function tao_conversion_items_parse( ci ){
102    var str = '';
103    if( jQuery && ci && ci.length ){
104        jQuery.each( ci, function(i,item){
105            str = str + '&c_cart_items['+item.id+'][name]='+encodeURI( item.name );
106            str = str + '&c_cart_items['+item.id+'][value]='+item.price;
107            str = str + '&c_cart_items['+item.id+'][detail]='+item.detail;
108        });
109    }
110    return str;
111}
112
113
114function tao_report_resource( c_type_show, c_type_resource, c_references, c_is_last ) {}
115
116function tao_iframe_request( url ) {
117    var use_url = url;
118    var req = function( ) {
119        var iframe_container = document.getElementById( 'tao-iframe-container' );
120        if( !iframe_container ) {
121            if( tao_ua_ie( ) && /* tao_ua_ie_version( ) < 9 && */ document.compatMode == 'BackCompat' ) {
122                iframe_container = document.createElement( '<div id="tao-iframe-container" style="display: none"></div>' );
123            } else {
124                iframe_container = document.createElement( 'div' );
125                iframe_container.setAttribute( 'id', 'tao-iframe-container' );
126                iframe_container.setAttribute( 'style', 'display: none' );
127            }
128            document.body.appendChild( iframe_container );
129        }
130        
131        var iframe_id = 'tao-iframe-'+tao_str_rand( );
132        var iframe = document.createElement( 'iframe' );
133        iframe.setAttribute( 'id', iframe_id );
134        iframe.setAttribute( 'src', use_url );
135        
136        iframe_container.appendChild( iframe );
137
138        if( jQuery ) {
139            jQuery( iframe_container ).hide();
140            jQuery( iframe ).hide();
141        }
142    }.bind( url );
143    
144    if( typeof _gaq != 'undefined' && typeof _gaq_trackers != 'undefined' && typeof jQuery != 'undefined' ) {
145        _gaq.push( function( ) {
146            jQuery.each( _gaq_trackers, function( i, _gat_name ) {
147                var pageTracker = _gat._getTrackerByName( _gat_name );
148                use_url = pageTracker._getLinkerUrl( use_url );
149                req( );
150                return false;
151            })
152        } );
153    
154    // http://support.microsoft.com/kb/927917/en-us
155    } else if( document.all ) {
156        if( jQuery ) {
157            jQuery( document ).ready( req );
158        } else {
159            window.setTimeout( req, 10 );
160        }
161    } else {
162        req( );
163    }
164}
165
166function tao_ua_ie( ) {
167    return navigator.appName == 'Microsoft Internet Explorer';
168}
169
170function tao_str_rand( ) {
171    return Math.random( ) * 1000000;
172}
173
174function tao_str_query_build( data ) {
175
176    var data_str = '';
177
178    if ( typeof jQuery == 'function' ) {
179        jQuery.each(
180            data,
181            function( i, str) {
182                data_str += ( data_str.length == 0 ? '' : '&' )+i+'='+escape( str );
183            }
184        )
185    } else {
186        for( i in data ) {
187            if ( typeof data[i] != 'function' && typeof data[i] != 'object' ) data_str += ( data_str.length == 0 ? '' : '&' )+i+'='+escape( data[i] );
188        }
189    }
190    
191    return data_str;
192}

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.