PageSourceSearch

https://www.vernier.com/wp-content/themes/creativo-child/assets/js/vse-analytics.js?ver=2025.09.04

js vernier.com collected 2026-10-01 10:42:12 UTC 2,713 bytes, 87 lines download raw bytes

1jQuery(document).ready(function($) {
2	// Matomo
3		var _paq = window._paq = window._paq || [];
4		/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
5		_paq.push(['requireCookieConsent']);
6		_paq.push(['trackPageView']);
7		_paq.push(['enableLinkTracking']);
8		(function() {
9			var u="https://vernier.matomo.cloud/";
10			_paq.push(['setTrackerUrl', u+'matomo.php']);
11			_paq.push(['setSiteId', '1']);
12			var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
13			g.async=true; g.src='//cdn.matomo.cloud/vernier.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
14		})();
15
16		// Generic event tracking (jQuery required and should be loaded as a dependency)
17		$('body').delegate('.matomo-event', 'click', function() {
18			var event_category	= $(this).attr('e_category');
19			var event_action	= $(this).attr('e_action');
20			var event_name		= $(this).attr('e_name');
21			_paq.push(['trackEvent', event_category, event_action, event_name]);
22		});
23
24	// Check for cookie consent cookie
25	if (window.getCkyConsent) {
26		const consent = getCkyConsent();
27
28		if (consent.categories.analytics) {
29			// Google Tag Manager
vendor: 343 bytes, lines 29-34
29
30			(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
31			new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
32			j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
33			'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
34			})(window,document,'script','dataLayer','
34GTM-WGWDTRS2
vendor: 8 bytes, lines 34-36
34');
35
36			
36// Matomo
37			_paq.push(['rememberCookieConsentGiven']);
38
39		} else {
40			// Matomo
41			_paq.push(['forgetCookieConsentGiven']);
42
43			// Clear all tracking cookies
44			let ca = document.cookie.split(';');
45			for(let i = 0; i < ca.length; i++) {
46				let c = ca[i];
47				let cookie_name = c.split('=')[0];
48				switch (true) {
49					case (cookie_name.includes('cookieyes')):
50					case (cookie_name.includes('wordpress')):
51					case (cookie_name.includes('wp-')):
52					case (cookie_name.includes('woocommerce')):
53					case (cookie_name.includes('wp_')):
54					case (cookie_name.includes('vernier_')):
55						break;
56					default:
57						deleteCookie(cookie_name);
58						break;
59				}
60			}
61		}
62	}
63
64
65	// Hat tip: https://www.w3schools.com/js/js_cookies.asp
66	function getCookie(cname) {
67	  let name = cname + "=";
68	  let ca = document.cookie.split(';');
69	  for(let i = 0; i < ca.length; i++) {
70		let c = ca[i];
71		while (c.charAt(0) == ' ') {
72		  c = c.substring(1);
73		}
74		if (c.indexOf(name) == 0) {
75		  return c.substring(name.length, c.length);
76		}
77	  }
78	  return "";
79	}
80
81	function deleteCookie(name) {
82		document.cookie = name + '=; Max-Age=-99999999; path=/; domain=' + location.hostname;
83	}
84
85
86});
87

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.