PageSourceSearch

https://tvzemedelec.cz/wp-content/plugins/adsanity-google-analytic…/js/adsanity-gati-public.js?ver=1.5.9

js tvzemedelec.cz collected 2026-10-09 01:28:09 UTC 1,687 bytes, 86 lines download raw bytes

1( function() {
2
3	//
4	// Is the gtag setup?
5	//
6	function isConfigured() {
7
8		for ( var i = 0; i < window.dataLayer.length; i++ ) {
9			if (
10				'config' === window.dataLayer[ i ][0] &&
11				window.ADSANITY_GATI.measurement_id === window.dataLayer[ i ][1]
12			) {
13				return true;
14			}
15		}
16
17		return false;
18	}
19
20	// Set up gtag if needed
21	if ( ! isConfigured() ) {
22		gtag( 'config', window.ADSANITY_GATI.measurement_id, {
23			'send_page_view' : window.ADSANITY_GATI.already_tracking === '0',
24		} );
25		gtag( 'js', new Date() );
26	}
27
28	//
29	// Handle a click of individual ad
30	//
31	function handleAdSanityClicks() {
32
33		var title = this.getAttribute( 'data-title' );
34
35		if ( 'universal' === window.ADSANITY_GATI.version ) {
36			gtag( 'event', 'click', {
37				'event_category' : 'AdSanity',
38				'event_label'    : title,
39			} );
40		} else {
41			gtag( 'event', 'select_item', {
42				items: [ {
43					item_name    : title,
44					item_category: 'AdSanity',
45				} ],
46			} );
47		}
48
49	}
50
51	//
52	// Handle view of an ad
53	//
54	function handleAdSanityViews( element ) {
55
56		var title = element.getAttribute( 'data-title' );
57
58		if ( 'universal' === window.ADSANITY_GATI.version ) {
59			gtag( 'event', 'view', {
60				'event_category' : 'AdSanity',
61				'event_label'    : title,
62				'non_interaction': true
63			} );
64		} else {
65			gtag( 'event', 'view_item', {
66				items: [ {
67					item_name    : title,
68					item_category: 'AdSanity',
69				} ],
70			} );
71		}
72
73	}
74
75	// Send view event and add click listener for every ad.
76	var ads = document.querySelectorAll( '.adsanity-gati' );
77
78	for ( var i = 0; i < ads.length; i++ ) {
79
80		handleAdSanityViews( ads[ i ] );
81
82		ads[ i ].addEventListener( 'click', handleAdSanityClicks );
83
84	}
85
86} )();

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.